protected void checkTypes(JavaScriptObject left, JavaScriptObject right) { if (!left.GetType().Equals(right.GetType())) { throw new TypeMismatchException(Position, left.GetType(), right.GetType()); } }