Use:
String value = Optional.ofNullable(getObjectOrNullIfNotAvailable()).map(Object::toString).orElse(null);
Otherwise, you can check if an Object is null and return in that case a String with "null" inside with String.valueOf(Object obj) or Objects.toString(Object obj). Eg.
String value = Objects.toString(getObjectOrNullIfNotAvailable())