title: Do you have to check for null & length or is there a shorter way to verify a non-empty string?
body: <p>I set the value of a hidden field <code>#thimble</code> on page load using server-side values.</p>
  
  <p>Then in JavaScript I want to act on that value only if it has been populated with some non-empty string.</p>
  
  <p>Is this the most concise way of checking that the value is non-empty?</p>
  
  <pre><code>if ($("#thimble").val() != null &amp;&amp; $("#thimble").val().length &gt; 0) {
      carryOn();
  }
  </code></pre>
  
  <p>Seems rather long.</p>