Adds validity checking to macro parsing process

Updates README
Fixed validity checking during macro parsing.

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