get_type_stats: fixed segfault introduced by removal of implicit casts