title: How to check multiple objects for nullity?
body: <p>Often, I can see a code constructs like following:</p>
  
  <pre><code>if(a == null || b == null || c == null){
      //...
  }
  </code></pre>
  
  <p>I wonder if there is any widely used library (Google, Apache, etc.) to check against nullity for multiple objects at once, e.g.:</p>
  
  <pre><code>if(anyIsNull(a, b, c)){
      //...
  }
  </code></pre>
  
  <p>or</p>
  
  <pre><code>if(allAreNulls(a, b, c)){
      //...
  }
  </code></pre>
  
  <p><strong>UPDATE:</strong></p>
  
  <ol>
  <li>I perfectly know how to write it by myself</li>
  <li>I know it can be the result of the poor program structure but it's not a case here</li>
  <li><p>Let's make it more challenging and replace original example with something like this:</p>
  
  <pre><code>if(a != null &amp;&amp; a.getFoo() != null &amp;&amp; a.getFoo().getBar() != null){
      //...
  }
  </code></pre></li>
  </ol>
  
  <p><strong>UPDATE 2:</strong></p>
  
  <p>I've created a pull request for Apache Commons Lang library to fix this gap:</p>
  
  <ul>
  <li>Issue: <a href="https://issues.apache.org/jira/browse/LANG-781" rel="noreferrer">https://issues.apache.org/jira/browse/LANG-781</a></li>
  <li>PR: <a href="https://github.com/apache/commons-lang/pull/108" rel="noreferrer">https://github.com/apache/commons-lang/pull/108</a></li>
  </ul>
  
  <p>These will be incorporated in commons-lang, version 3.5:</p>
  
  <ul>
  <li><code>anyNotNull (Object... values)</code></li>
  <li><code>allNotNull (Object... values)</code></li>
  </ul>