Two reasons:
1) What if the variable is set by entering the contents of an empty input field?
if(someScenario){
var variable = $('empty-box').val(); }
, , , someScenario . , . false, true. , , .
.
if(typeof variable !== 'undefined')
, , .
2) , typeof , . , , , , . , typeof, , , .