code: public static TypedValue untypedValue(Object value, boolean isTransient) {
      if(value == null) {
        return untypedNullValue(isTransient);
      } else if (value instanceof TypedValueBuilder<?>) {
        return ((TypedValueBuilder<?>) value).setTransient(isTransient).create();
      } else if (value instanceof TypedValue) {
        TypedValue transientValue = (TypedValue) value;
        if (value instanceof NullValueImpl) {
          transientValue = untypedNullValue(isTransient);
        } else if (value instanceof FileValue) {
          ((FileValueImpl) transientValue).setTransient(isTransient);
        } else if (value instanceof AbstractTypedValue<?>) {
          ((AbstractTypedValue<?>) transientValue).setTransient(isTransient);
        }
        return transientValue;
      }
      else {
        // unknown value
        return new UntypedValueImpl(value, isTransient);
      }
    }
docs: Creates an untyped value, i.e. {@link TypedValue#getType()} returns <code>null</code>
  for the returned instance.