Use CONVERT_FAIL and CONVERT_OK instead of CAST_FAIL and CAST_OK. It will be more precise.