get_type_stats: throw error if type1 == type 2