kotlin-stdlib / kotlin.jvm.optionals / java.util.Optional / getOrNull getOrNull JVM JRE8 1.8 fun <T : Any> Optional<T>.getOrNull(): T?(source) Returns this Optional's value if present, or otherwise null.