getOrNull

fun getOrNull(): T?

Returns the value if it is present, otherwise returns null.

Return

the value if present, otherwise null