return (Value) value;
} else if (value == null) {
return new TextValue(null, null);
} else {
if (value instanceof Boolean) {
return new BooleanValue(null, (Boolean) value);
} else if (value instanceof Double) {
return new NumberValue(null, value.toString());
} else if (value instanceof String) {
return new TextValue(null, (String) value);
} else if (value instanceof Long) {