Finally I found this easy way to do it:
if (MyVariable?){ ... }
that will generate:
if (typeof MyVariable !== "undefined" && MyVariable !== null){ ... }
UPDATE 04/07/2014
Demo Link

Finally I found this easy way to do it:
if (MyVariable?){ ... }
that will generate:
if (typeof MyVariable !== "undefined" && MyVariable !== null){ ... }
UPDATE 04/07/2014
Demo Link
