Refactor the FPTOOLS_CHECK_HTYPE macro