Kotlin Map with non null values

There is another method for getting not null value from map:

fun <K, V> Map<K, V>.getValue(key: K): V

throws NoSuchElementException - when the map doesn't contain a value for the specified key and no implicit default value was provided for that map.

but operator for get == map[] returns nullable.

operator fun <K, V> Map<out K, V>.get(key: K): V?

It is not about the implementation of Map (being it Kotlin or Java based). You are using a Map and a map may not have a key hence [] operator returns nullable type.