How To Check If A Variable Has Value In Javascript