title: Comparison with string doesn't work in Jenkins pipeline
body: <p>Any idea why the <code>IF-ELSE</code> below works</p>
  
  <pre><code>def checkPrValidity() {
      wordCountStr = sh returnStdout: true, script: 'git diff --ignore-space-at-eol $target_branch..PRbranch src | wc -l' 
      wordCount = wordCountStr.toInteger() //force conversion to int data type 
      if (wordCount == 0) {
          return false;
      } else {
          println("This is a valid PR, continue the job execution")
          return true;
      }
  }
  </code></pre>
  
  <p>while the one below doesn't </p>
  
  <pre><code>def checkPrValidity() {
      wordCountStr = sh returnStdout: true, script: 'git diff --ignore-space-at-eol $target_branch..PRbranch src | wc -l'
      if (wordCountStr == '0') {
          return false;
      } else {
          println("This is a valid PR, continue the job execution")
          return true;
      }
  }
  </code></pre>
  
  <p>Why do i need to specifically convert a <code>string</code> to <code>Integer</code>, while it fails to compare it as a <code>string</code> data type? </p>