letSafe

fun <T, R> letSafe(obj: T?, block: Function<T, R?>): R?

Calls the specified function block with nullable obj value as its argument and returns its result.

If obj is null, the function is not called.