Shouldn't this be throwTypeMismatch(node, theType): ?