Allow type substitution in is_sub_type