Cleaned up assertType method in TypeChecker