No value is still true in javascript
<p>I need to check some data given by a dataset attribute, it can happen that the dataset is empty, if so I still need to skip with a if statement, but an empty dataset is still true, I have tried...null, undefined and they dont work.</p>

<p>So if there's no value present it should be false.</p>

<pre><code>// false
&lt;div data-value=""&gt;&lt;/div&gt;

if($('div').data('value') !== ""){
   alert('hello ...world?')
}

//true
&lt;div data-value="  "&gt;&lt;/div&gt;

if($('div').data('value') !== ""){
   alert('hello ...world?')
}
</code></pre>
