typeToInt, returns TYPE enum as int value