Javascript If Variable Is Not Undefined