Javascript Test If Variable Is Defined