ifNull

inline fun <T : Any> T?.ifNull(action: () -> Unit): Boolean

Calls the supplied action if the receiver is null.

Return

true if the receiver is null, false otherwise.

Parameters

T

The type of the receiver.

action

The action to invoke if the receiver is null.