title: BehaviorSubject with boolean value is not working as intended
body: <p>I have implemented a simple <code>BehaviorSubject</code>,</p>
  
  <pre><code>import {BehaviorSubject} from "rxjs";
  
  class MyWeirdoClass {
  
    constructor() {}
  
  
    private st: Subject&lt;boolean&gt; = new BehaviorSubject&lt;boolean&gt;(null);
  
  
    changeSt(val:boolean){
      this.st.next(val);
    }
  
  
    val(){
      this.st.subscribe(res=&gt;{
        if (res){
          console.log(res);
        }
      })
    }
  
    stStatus() {
      this.val();
      this.changeSt(true);
      this.val();
      this.changeSt(false);
      this.val();
    }
  
  
  }
  </code></pre>
  
  <p>now when running <code>stStatus()</code> gives logs the following output on the console.</p>
  
  <pre><code>true
  true
  </code></pre>
  
  <p>while I expect the value </p>
  
  <pre><code>false
  true
  false
  </code></pre>
  
  <p>What is wrong with my implementation?</p>