make get_type_classes work consistently for all types, not just the base type