takeIfNotEmpty

fun <T, C : Collection<T>> C.takeIfNotEmpty(): C?
fun <K, V, C : Map<K, V>> C.takeIfNotEmpty(): C?