Could define your own, I have a function sitting a...
# announcements
k
Could define your own, I have a function sitting around for something just like that:
Copy code
fun <K, V> Map<K?, V>.filterNotNullKeys(): Map<K, V> {
  return this
      .filterKeys { it != null }
      .mapKeys { it.key!! }
}
Not sure how efficient this would be, but no casting involved