improve type predicates