title: Null and empty check in one go in groovy
body: <p>Can someone please clarify below issue.</p>
  <p>Below validation throw NULL pointer error when pass null in myVar. It is because of <code>!myVar.isEmpty()</code></p>
  <pre><code>if (myVar!= null || !myVar.isEmpty() ) {
               
               some code///
                  }
  </code></pre>
  <p>Below works though as expected,</p>
  <pre><code>if (myVar!= null) {
          if (!myVar.isEmpty()) {
               some code///
  
                  }
  </code></pre>
  <p>Any other way of having both steps together.</p>