Added isType(), and gave typeCheck() an implementation for the case where the expression is a variable.