ifNotNull

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

Calls the supplied action if the receiver is not null.

Return

true if the receiver is not null, false otherwise.

Parameters

T

The type of the receiver.

action

The action to invoke if the receiver is not null.