Added TIPID validation and conversion (to/from int) functions