egslava
public inline fun <T> Collection<T>?.hasEntries(): Boolean = this != null && !this.isEmpty() fun foo(ll: MutableList<Int>?) { if (ll.hasEntries()) { ll.clear() // ← error here } }