Existing HSQL code uses isDateTimeType() and isCharacterType() for this kind of checking.