Check for extra spaces and prevent them from becoming undefined tokens