public static boolean isLegalFieldValue(Object value) {
        Class clazz = value.getClass();
        if (clazz == String.class) return true;
        if (clazz == Integer.class) return true;
        if (clazz == Long.class) return true;
        if (clazz == Float.class) return true;
        if (clazz == Double.class) return true;
        if (clazz == Boolean.class) return true;
        if (clazz == YqlQuery.class) return true;
        if (clazz == QueryProfile.class) return true;
        if (clazz == Tensor.class) return true;
        return false;
    }
Returns true if the given object is a legal field value of some field value type
container-search/src/main/java/com/yahoo/search/query/profile/types/FieldType.java