title: Is there a standard function to check for null, undefined, or blank variables in JavaScript?
body: <p>Is there a universal JavaScript function that checks that a variable has a value and ensures that it's not <code>undefined</code> or <code>null</code>? I've got this code, but I'm not sure if it covers all cases:</p>
  
  <pre><code>function isEmpty(val){
      return (val === undefined || val == null || val.length &lt;= 0) ? true : false;
  }
  </code></pre>