title: Java Replace / Improve null check
body: <p>I have a pseudo Java method where everything can be nullable:</p>
  
  <pre><code>private String prepareMessage(Scope scope) {
      if (scope != null) {
          if (scope.getPermission != null) {
              if (scope.getInfo != null) {
                  return "Successful";
              } else {
                  return "Missing field Info";
              }
          } else if (scope.getInfo() != null) {
              return "Permission field not provided";
          }
      }
      return "Permission and Info fields not provided";
  }
  
  </code></pre>
  
  <p>How can I simplify this code to remove terrible looking null checks? Thanks !</p>