Macro for checking hex base strings