Javascript Check If String Is Not Undefined