public boolean checkObjectType(Object o) {
    switch (this) {
      case BOOLEAN:
        return o instanceof Boolean;
      case INT32:
        return o instanceof Integer;
      case INT64:
      case TIMESTAMP:
        return o instanceof Long;
      case FLOAT:
        return o instanceof Float;
      case DOUBLE:
        return o instanceof Double;
      case DATE:
        return o instanceof LocalDate;
      case BLOB:
        return o instanceof Binary;
      case STRING:
      case TEXT:
        return o instanceof String;
      default:
        return false;
    }
  }
A substitution class for TsDataType in UDF APIs.
iotdb-api/udf-api/src/main/java/org/apache/iotdb/udf/api/type/Type.java