Type checking now uses the NodeType enum instead of the GetType() method.
Fixed some bugs in expression parsing.