Added code in getTypeName() function to determine the class of a term
with a parameter variable but some are still not working :(