title: How to only execute an Observable if term is not null/empty?
body: <p>I have the following code inside my constructor:</p>
  
  <pre><code>this.searchResults = this.searchTerm.valueChanges
      .debounceTime(500)
      .distinctUntilChanged()
      .switchMap(term =&gt; this.apiService.search({
          limit: this.searchResultsLimit,
          term: term
      }));
  </code></pre>
  
  <p>And this is my input</p>
  
  <pre><code>&lt;input type="text" [formControl]="searchTerm" /&gt;
  </code></pre>
  
  <p>You can see the tutorial I followed to get the code <a href="https://blog.thoughtram.io/angular/2016/01/06/taking-advantage-of-observables-in-angular2.html#putting-some-sugar-on-top" rel="noreferrer">here</a>.</p>
  
  <p>My API service method is as followed:</p>
  
  <pre><code>searchCompanies(options): Observable&lt;any[]&gt; {
      return this.jsonp.get('api/search', this.formatOptions(options)).map(res =&gt; {   
          return res.json();
      });
  }
  </code></pre>
  
  <p>Each time <code>searchTerm</code> is changed inside my input, the API call is fired. My problem is that the call is fired even when my input is empty (such as typing a query, then backspacing it all).</p>
  
  <p>My question is, how can I only get my observable to fire when the value of `searchTerm is not empty/null?</p>