get the current object value as String if the current Object is null
return null.
431459
public String asString() {
		if (current == null)
			return null;
		if (current instanceof String)
			return (String) current;
		return current.toString();
	}
1131516
public String getFirstStringValue(String name) {
        Object objs[] = getValues(name);
        for (Object obj : objs) {
            if (obj instanceof String) {
                return (String) obj;
            }
        }
        return null;
    }
770928
private Object getObjectForString(Class<?> type, String values[]) throws Exception{
    if(values == null || values.length == 0)
      throw new Exception("getObjectForString: values was null or of zero length");
    Object array = Array.newInstance(type.getComponentType(), values.length);
    // Now fill in the values for the empty array we just created.
    for(int i = 0; i < values.length; i++)
      Array.set(array, i, getObjectForString(type, values[i]));
    return array;
  }
246900
public Object fromString(String str)
    {
        if (StringUtils.isNotBlank(str)) {
            ObjectMapper objectMapper = new ObjectMapper();

            try {
                return objectMapper.readValue(str, Object.class);
            } catch (Exception e) {
                LOGGER.info("Failed to parse JSON [{}]: ", StringUtils.abbreviate(str, 32),
                    ExceptionUtils.getRootCauseMessage(e));

                return null;
            }
        }

        return null;
    }
1341068
public static String getStringFor(String name, Object obj)
	{
		if(obj == null)
			throw new NullPointerException("obj is null");
		return getStringFor(name,obj.getClass());
	}
149025
public Object getValue()
    {
        if ( value == Special.NULL_VALUE )
            return null;
        if ( value == Special.VOID_TYPE )
                throw new InterpreterError("attempt to unwrap void type");
        return value;
    }
1064608
function object(a) {
    if(Object.prototype.toString.call(a) === '[object Array]') {
        return false;
    }

    return a !== null && typeof a === 'object';
}
802868
private static Object getSimpleValue(Object obj, Property property) {
        if (property == null) {
            throw new IllegalArgumentException("Cannot get the value from a 'null' property.");
        }

        return property.get(obj);
    }
640056
public static String getString(JsonObject object, String field) {
        final JsonValue value = object.get(field);
        throwExceptionIfNull(value, field);
        return value.asString();
    }
536054
public Object get(Object key) {
        checkThread();
        return current == null ? null : current.get(key);
    }
717149
public static String getString(Object from, Field field)
    {
        PropertyAccessor<?> accessor = PropertyAccessorFactory.getPropertyAccessor(field);
        Object object = getObject(from, field);
        return object != null ? accessor.toString(object) : null;
    }
215527
private static function tostring($value) : string
    {
        if (!isset($value)) {
            return 'NULL';
        }
        if ($value === true) {
            return 'true';
        }
        if ($value === false) {
            return 'false';
        }
        if (is_numeric($value)) {
            return $value;
        }
        if (is_string($value)) {
            return "'$value'";
        }
        if (is_array($value)) {
            $out = '[';
            $i = 0;
            foreach ($value as $key => $entry) {
                if ($i) {
                    $out .= ', ';
                }
                $out .= $key.' => '.self::tostring($entry);
                $i++;
            }
            $out .= ']';
            return $out;
        }
        if (is_object($value)) {
            if (method_exists($value, '__toString')) {
                return "$value";
            } else {
                return get_class($value);
            }
        }
    }
233547
def get_object_as_string(obj):
    
    if isinstance(obj, str):
        return obj
    if isinstance(obj, list):
        return '\r\n\;'.join([get_object_as_string(item) for item in obj])
    attrs = vars(obj)
    as_string = ', '.join("%s: %s" % item for item in attrs.items())
    return as_string
1001900
function getObjectToStringValue(value) {
            var result = objectToString.call(value);
            switch (result) {
                case '[object Undefined]':
                    return '#Undefined';
                case '[object Null]':
                    return '#Null';
                case '[object Object]':
                    return 'Object';
                case '[object Function]':
                    return 'Function';
                case '[object String]':
                    return 'String';
                case '[object Number]':
                    return (value != +value) ? '#NaN' : 'Number';
                case '[object Array]':
                    return 'Array';
                case '[object Boolean]':
                    return 'Boolean';
                case '[object RegExp]':
                    return 'RegExp';
                case '[object Symbol]':
                    return 'Symbol';
                case '[object Map]':
                    return 'Map';
                case '[object WeakMap]':
                    return 'WeakMap';
                case '[object Set]':
                    return 'Set';
                case '[object WeakSet]':
                    return 'WeakSet';
                case '[object Int8Array]':
                    return 'Int8Array';
                case '[object Uint8Array]':
                    return 'Uint8Array';
                case '[object Uint8ClampedArray]':
                    return 'Uint8ClampedArray';
                case '[object Int16Array]':
                    return 'Int16Array';
                case '[object Uint16Array]':
                    return 'Uint16Array';
                case '[object Int32Array]':
                    return 'Int32Array';
                case '[object Uint32Array]':
                    return 'Uint32Array';
                case '[object Float32Array]':
                    return 'Float32Array';
                case '[object Float64Array]':
                    return 'Float64Array';
                case '[object ArrayBuffer]':
                    return 'ArrayBuffer';
                case '[object DataView]':
                    return 'DataView';
                case '[object Error]':
                    return 'Error';
                case '[object Arguments]':
                    return 'Arguments';
                case '[object JSON]':
                    return 'JSON';
                case '[object Math]':
                    return 'Math';
                case '[object Date]':
                    return 'Date';
                default: //handle the rest (HTML element, future global objects,...)
                    return result.slice(8, -1);
            }
        }
510476
public String value(Object context) {
		return this.property != null ? this.property.get(context) : null;
	}
648744
def value(self):
        
        if self._wrapped is not self.Null:
            return self._wrapped
        else:
            return self.obj
165677
public static String getIdString(Object object) {
		if (object == null) {
			throw new NullPointerException();
		}
		return String.valueOf(getId(object));
	}