title: Kotlin - Type mismatch: inferred type is Any? but Boolean was expected
body: <p>I'm trying my hands on Kotlin. Being from a Python background is really giving me a tough time to get the knack of the Kotlin syntax. I'm trying to do a simple dictionary (Mutable Map) operation. However, its giving me exceptions.</p>
  <p><a href="https://pl.kotl.in/y4hcWRJN0" rel="nofollow noreferrer">This is what I tried. Kotlin compiler</a></p>
  <p>Adding the code snippet for reference.</p>
  <pre><code>fun main() {
      val openActivityMap = mutableMapOf&lt;String, MutableMap&lt;String, Any&gt;&gt;()
      val packageName = &quot;amazon&quot;
      val currentTime = 23454321234
      if(openActivityMap.containsKey(packageName)){ 
          if(openActivityMap[packageName]?.get(&quot;isAlreadyApplied&quot;)){
              if((openActivityMap[packageName]?.get(&quot;lastAppliedAt&quot;) - currentTime) &gt; 3600){
                  openActivityMap[packageName]?.put(&quot;isAlreadyApplied&quot;, false)
              }
          }
          else{
              openActivityMap[packageName]?.put(&quot;isAlreadyApplied&quot;, false)
          }
      }
  }
  </code></pre>