Move optional type predicates to type.c.