takeUnless

inline fun <T> T.takeUnless(predicate: (T) -> Boolean): T? (source)

Platform and version requirements: Kotlin 1.1

Returns this value if it does not satisfy the given predicate or null, if it does.