Fix .isUndefined, see #2186