I have written a macro that works if the "attribute definition" "name-a" is in the drawing but if its not found it pauses for user input. What I'm looking to do for is to add a conditional expression. If ""attribute definition" "name-a" is not found then it will end the macro. The text window reads out:

Select objects: (ssget"_X" '((0 . "ATTDEF") (2 . "NAME-A")))
nil


*Invalid selection*


This is the macro I am trying to add the conditional expression to:

^C^C-LAYER;t;ANNO_REORDER;u;ANNO_REORDER;on;ANNO_REORDER;;^C^C-LAYER;m;ANNO_REORDER;c;55;ANNO_REORDER;; ^C^C-LAYER;^C^C-CH;(ssget"_X" '((0 . "ATTDEF") (2 . "NAME-A")));;properties;layer;ANNO_REORDER;;


thank you in advance