Update type checking to handle unification.