title: How to pass null to an Observable with nullable type in RxJava 2 and Kotlin
body: <p>I initialize my variable like this:-</p>
  
  <pre><code> val user: BehaviorSubject&lt;User?&gt; user = BehaviorSubject.create()
  </code></pre>
  
  <p>But I can't do this. IDE throws an error:-</p>
  
  <pre><code>user.onNext(null)
  </code></pre>
  
  <p>And doing this, IDE says u will never be null:-</p>
  
  <pre><code>user.filter( u -&gt; u!=null)
  </code></pre>