Check If Variable Is Not Undefined In Javascript