Minor performance optimizations to some of the compiler internal type checking predicates