consolidate type checking functions in function IS