adding missing quotes around the 'undefined' check