Fixed validity checking during macro parsing.

Changed all instances of undefined to 'undefined' to ensure accuracy in
validity checking.