Implement the rest of the type checking rules.