title: Is there a better way to write my if statement?
body: <p>I have a function that checks if multiple conditions are fulfilled before performing an operation. The code below shows all conditions that must be fulfilled.</p>
  <pre><code>        if (!user.isPresent()) {
              throw new ResourceNotFoundException(MessageUtil.ERROR_USER_NOTFOUND);
          }
  
          if (!account.isPresent()) {
              throw new ResourceNotFoundException(MessageUtil.ERROR_ACCOUNT_NOT_FOUND);
          }
  
          if (account.get().getStatus() == AccountStatus.CLOSED) {
              throw new BadRequestException(&quot;Error. This account is closed&quot;);
          }
  
          if (!user.get().getGroups().contains(group)) {
              throw new BadRequestException(&quot;Error. You are not a member of this group&quot;);
          }
  </code></pre>
  <p>This code works perfectly as is. However, is there a better way of writing my if statements? Something about the look of it just feels wrong, feels verbose.</p>