title: Angular Cannot read property 'subscribe' of null
body: <p>I am getting the error </p>
  
  <blockquote>
    <p>cannot read property 'subscribe' of null.</p>
  </blockquote>
  
  <p>This is where the error is happening, this is called by the constructor of its class:</p>
  
  <pre><code>loadItems() {
      this.itemService.subscribeItems().subscribe(x =&gt; {
        this.items = x;
        console.log(x);
      });
  }
  </code></pre>
  
  <p>It calls this services method, this is where the issue is I think. It may be to do with the <code>return null</code></p>
  
  <pre><code>subscribeItems(): Observable&lt;Item[]&gt; {
      this.session.uid.subscribe(x =&gt; {
              return this.af.database.list('users/' + x + '/Items')
              .map(Item.fromJsonList);
      });
      return null;
  }
  </code></pre>
  
  <p>the session service holds the uid which is updated when the user logs in:
  This part works ok.</p>
  
  <pre><code>_uid = new BehaviorSubject&lt;string&gt;('');
  uid = this._uid.asObservable();
  </code></pre>