singleOrNull

open fun singleOrNull(): T?

Get the single element or null if not found.


open fun singleOrNull(condition: T.() -> Boolean): T?