title: Alternative writing of null check between two variables?
body: <p>I am having a bit of a conundrum.
  I have 2 objects <code>A</code> and <code>B</code>.
  They can come as <code>null</code> or not <code>null</code>, and I have to do some different business logic in all of those situations.</p>
  
  <p>At the moment I have:</p>
  
  <pre><code>if(A != null &amp;&amp; B != null) { /* operation1 */ } 
  if(A == null &amp;&amp; B == null) { /* operation2 */ }
  if(A != null &amp;&amp; B == null) { /* operation3 */ } 
  if(A == null &amp;&amp; B != null) { /* operation4 */ }
  </code></pre>
  
  <p>Can you recommend me a way of writing those <code>if</code>s in a more elegant way?</p>