title: RxJava : Creating observable from a Nullable object
body: <p>I'm new to RxJava. I have a code like this. I'm creating an observable from a string  returned from <code>repository.getStatus()</code>. if it is null , I have to proceed with the <code>proceed</code> method without doing anything. If it is not null ,  I have to call <code>repository.init()</code> and then <code>proceed</code>. Here's what I have done.</p>
  
  <pre><code>Flowable.just(repository.getStatus()) // getStatus return a string , which can be null
          .doOnError(throwable -&gt; proceed())
          .flatMapCompletable(s -&gt; repository.init())
          .observeOn(Schedulers.io())
          .subscribeOn(AndroidSchedulers.mainThread())
          .subscribe(new DisposableCompletableObserver() {
                         @Override
                         public void onComplete() {
                             proceed();
                         }
  
                         @Override
                         public void onError(@NonNull Throwable e) {
                              handleErrors(t));
                         }
                    });
  
  private void proceed(){
      // 
  }
  </code></pre>
  
  <p>In case <code>repository.getStatus()</code> is null , wont it call the <code>doOnError(throwable -&gt; proceed())</code>? 
  Now it is crashing when <code>repository.getStatus()</code> is null. What is the best Rx way to deal with this kind of a usecase?                      </p>