title: Non-null assert is needed even after checking is not null in kotlin
body: <p>I have this code in Kotlin in android studio:</p>
  
  <pre><code>result.put(REGISTER_DATE, if (activityData.registerDate == null) -1 else activityData.registerDate.totalDays)
  </code></pre>
  
  <p>As you can see I check registerDate is not null, but I have to put non-null assert after <code>activityData.registerDate</code> to eliminate null error:</p>
  
  <pre><code>result.put(REGISTER_DATE, if (activityData.registerDate == null) -1 else activityData.registerDate!!.totalDays)
  </code></pre>
  
  <p>Is this a bug in Kotlin or is related to Android Studio?</p>