title: orElseThrow of optional object can not be resolved
body: <p>I am quite new to the concept of Optional. In the code posted below, i am checking the following:</p>
  
  <pre><code>if (operation_1) {
  
      if (operation_2) {
  
          if (operation_3) {
  
          } else {
              throw_3
          }
      } else {
          throw_2
      }
  } else {
      throw_1
  }
  </code></pre>
  
  <p>but for this code, android studio, generates an error for the second orElseThrow() operation "marked below".
  please let me why I receive this error?how to fix it? whether or not the code i wrote below satisfies the conditions shown above.</p>
  
  <p><strong>code</strong>:</p>
  
  <pre><code>OptionalsUtils.toOptional(Room.databaseBuilder(getApplicationContext(), MovieDatabase.class, ActMain.DATA_BASE_NAME))//operation_1
              .map(x-&gt;{
                  MovieDatabase movieRoomDb = x.fallbackToDestructiveMigration().build();
                  this.setInitializedBuiltMovieRoomDatabase(movieRoomDb);
                  return movieRoomDb;
              })//operation_2
              .map(y-&gt;{
                  SupportSQLiteOpenHelper openHelperInstance = y.getOpenHelper();
                  this.setSQLOpenHelperInstance(openHelperInstance);
                  return openHelperInstance;
              })//operation_3
              .orElseThrow(()-&gt; new NullPointerException(THROW_SQL_OPEN_HELPER_NULL))//throw_3
              .orElseThrow(()-&gt; new NullPointerException(THROW_ROOM_DATABASE_PERSISTENT_BUILD_NULL))//throw_2&lt;-cases error
              .orElseThrow(()-&gt; new NullPointerException(THROW_ROOM_DATABASE_PERSISTENT_BUILDER_NULL));//throw_1
  </code></pre>