title: Android Room returns Null as Non-Null type
body: <p>I have <code>Dao</code> to return simple object. If object does not exist, Room return <code>null</code>, but Android app have no crashes. Also if I assign that value to non-null variable, no crashes are in app.</p>
  
  <p>Dao:</p>
  
  <pre><code>@Query("SELECT * FROM users WHERE id LIKE :id LIMIT 1")
  abstract fun getById(id: Long): User
  </code></pre>
  
  <p>not crashing code:</p>
  
  <pre><code>doAsync {
      val user: User = userDao.getById(999)   // user 999 not exist, userDao returns null
      uiThread {
          if (user == null) {
              Timber.d("user is $user")   // "user is null" in log
          } else {
              Timber.d("user is ${user.email}")
          }
      }
  }
  </code></pre>
  
  <p>I have two questions:</p>
  
  <ol>
  <li>How is possible that Room can return Null value as Non-Null variable?</li>
  <li>How is possible that code with assign null to Non-Null variable has <strong>no crashes</strong>?</li>
  </ol>