title: Return a null/empty Observable in Angular 6 with Rxjs 6
body: <p>I am working on <strong>Angular 6 with Rxjs 6</strong> while I have a question regarding returning a null/empty Observable if response failed or has exception, Here is my assumption, my remote api will return an object of <strong>IOptionResponse</strong>, <strong>it contains a message string which could be indicated like 'SUCCESS' or 'FAILED', it also contains a model which is an array of 'IOption' object</strong></p>
  
  <pre><code>export interface IOptionResponse {
      message: string;
      model: IOption[];
  }
  </code></pre>
  
  <p>Here is my service method name, <strong>it will return a Observable of IOption array which is the "model" of my remote API result</strong></p>
  
  <pre><code>loadIOptionMembersRelationship(): Observable&lt;IOption[]&gt; {
      return this.httpClient.get&lt;IOptionResponse&gt;('${environment.apiUrl}/api/member/XXX')
          .map(
              (response) =&gt; {
                  console.log(response);
                  // if response.message is success, return IOption[] model
                  if (response.message == responseMessage.Success) {
                      return response.model;
                  }
                  else {
                      // return Observable.empty&lt;IOption[]&gt;(); failed
                      // return new Observable.empty&lt;IOption[]&gt;(); failed
                      // return new EmptyObservable&lt;IOption[]&gt;(); failed
                      // return new Observable&lt;IOption[]&gt;.from([]); failed
                      // Otherwise return a NULL/EMPTY Observable
                      //What should be the correct way to implement here???
                  }
              }
          );
  }
  </code></pre>
  
  <p>I've read the post <a href="https://stackoverflow.com/questions/38548407/how-to-return-an-empty-observable-in-rxjs">here</a> which is similar, however I tried all the possible solution and they do not work, I am not sure if it's because that posted solutions are out of date or maybe some method changed in rxjs 6 or maybe it's a typescript issue...</p>