ifTake

inline fun <T> ifTake(value: Boolean, block: () -> T): T?

Returns the result of block if value is true, else null. Similar to takeIf, but flipped arguments.