title: Checking to see if a value exists in Javascript
body: <p>How do I prevent a Javascript alert from firing if the alert value is undefined?  In other words, something like this:</p>
  
  <pre><code>if (alert(message) != 'undefined') {
          alert(message);
      }
  </code></pre>