removed non-working function isUndefined