allNotNull

inline fun <A, B, R> allNotNull(var1: A?, var2: B?, block: (A, B) -> R): R?

Util method that returns the result of block if both var1 and var2 are not null. Otherwise returns null.

allNotNull(var1, var2) { v1, v2 -> ... }

inline fun <A, B, C, R> allNotNull(var1: A?, var2: B?, var3: C?, block: (A, B, C) -> R): R?

Util method that returns the result of block if all three var1, var2 and var3 are not null. Otherwise returns null.

allNotNull(var1, var2, var3) { v1, v2, v3 -> ... }