@PaulyPHI Here is a quick walk-though: This uses Visual LISP to pull the text string from the selected object and convert it to a real number. See the added comments below.
(if
(and ;; Logical AND = All conditions must be met.
;; 1) an object must be selected.
(setq es (entsel "\nSelect Text Object: "))
;; 2) The selected object must have a text string property, i.e. TEXT, MTEXT, ATTRIBUTE, MLEADER, etc.
(vlax-property-available-p (vlax-ename->vla-object (car es)) 'TextString)
;; 3) Retrieve the textsting value if the above conditions are met.
(setq newZ (vla-get-textstring (vlax-ename->vla-object (car es))))
;; 4) The textstring value must evaluate to greater than 0 when converted to a real number. This only works if the text is numerical.
(> (setq newZ (distof newZ)) 0.0)
) ;; if all conditions are met, then continue to the (progn) block that performs the changes.