Kotlin Map with non null values : <p>Let say that I have a Map for translating a letter of a playing card to an integer </p>

<pre><code> val rank = mapOf("J" to 11, "Q" to 12, "K" to 13, "A" to 14)
</code></pre>

<p>When working with the map it seems that I always have to make a null safety check even though the Map and Pair are immutable:</p>

<pre><code>val difference = rank["Q"]!! - rank["K"]!!
</code></pre>

<p>I guess this comes from that generic types have Any? supertype. Why can't this be resolved at compile time when both Map and Pair are immutable?</p>
