Added a check to see if identifiers exist before adding them as tokens