title: Simplify checking "null or empty" for multiple variables in IF statement
body: <p>I have two string variables in validation function which should ensure that variables won't be null or empty at the same time (also the case when one is null and other equals to empty, is not allowed).</p>
  
  <p>Current IF statement is very complex as I have to check:</p>
  
  <ol>
  <li>if both are null</li>
  <li>if both are empty (if their lengths are equal to 0)</li>
  <li>if string1 is null and string2 is empty</li>
  <li>if string1 is empty and string2 is null</li>
  </ol>
  
  <p>It is functional but ugly and not "best practice". How can it be simplified?</p>
  
  <pre><code>if ((string1==null &amp;&amp; string2==null) || (string1.length==0 &amp;&amp; string2.length==0) || (string1==null &amp;&amp; string2.length==0) || (string2==null &amp;&amp; string1.length==0))
  </code></pre>