Fix typos in undefined check.