Change class type comparison method