title: optional orElseThrow gives null pointer exception
body: <p>I have this method:</p>
  
  <pre><code>public Tenant getTenant(String tenantId) throws TenantNotFoundException {
  return tenantDatabaseService.findTenantById(tenantId)
      .orElseThrow(() -&gt; new TenantNotFoundException("Tenant not found"));
  }
  </code></pre>
  
  <p><code>tenantDatabaseService.findTenantById(tenantId)</code> returns an <code>Optional</code>: </p>
  
  <pre><code>public Optional&lt;Tenant&gt; findTenantById(String id) {
      return tenantRepository.findById(id);
  }
  </code></pre>
  
  <p>When <code>findById</code> is null, I want the exception to be thrown.
  Instead, I see a <code>NullPointerException</code> being thrown: </p>
  
  <pre><code>Failed to complete request: java.lang.NullPointerException: while trying to invoke the method 
  java.util.Optional.orElseThrow(java.util.function.Supplier) of a null object returned from 
  com.sap.gb.service.TenantDatabaseService.findTenantById(java.lang.String)
  </code></pre>
  
  <p>Any help here?</p>