getOrNull

Returns this Optional's value if present, or otherwise null.

Since Kotlin

1.7