title: Type 'boolean' is not assignable to type 'Observable<boolean>'
body: <p>I have that code</p>
  
  <pre><code>method(): Observable&lt;boolean&gt; {
      return this._http.get('sessionId=' + sessionId).map(res=&gt; {
        if (res.status === "success") {
          return true;
        }
        return false;
      });
  }
  </code></pre>
  
  <p>But when <code>sessionId</code> is '' it throws an exception and console logs 401 error</p>
  
  <p>and I add if inside that method:</p>
  
  <pre><code>method(): Observable&lt;boolean&gt; {
      if (sessionId === '')
        return false;
      return this._http.get('sessionId=' + sessionId).map(res=&gt; {
        if (res.status === "success") {
          return true;
        }
        return false;
      });
    }
  </code></pre>
  
  <p>But now I'm getting an error:</p>
  
  <blockquote>
    <p>Type 'boolean' is not assignable to type 'Observable'.</p>
  </blockquote>
  
  <p>How can I solve that?</p>
  
  <p>If I add <code>Observable&lt;boolean&gt; | boolean</code> then I'm getting error that </p>
  
  <blockquote>
    <p>Property 'map' does not exist on type 'boolean | Observable'.</p>
  </blockquote>