I know this isn't part of this patch, but do we really need to check for `!== undefined`?