Fetching content from a form, should I check for undefined or null or?
<p>If I do this:</p>

<pre><code>var text = $("#some-input-box").val();


// check for null/empty string
if(text == null || text = undefined || text.length == 0 ) {

}
</code></pre>

<p>I want check for all cases if the value returned is null or empty string etc.</p>

<p>What should I be checking for here?  </p>

<p>Is it a good idea to make a generic function that returns true/false if the text is empty or null or undefined ?</p>
