here is a function to test what type the item is, hth:
(defun what-type (e / typ)
(setq typ (type e))
(cond
((eq typ 'ENAME) 'Entity-name)
((eq typ 'EXRXSUBR) 'External-ObjectARX-application)
((eq typ 'FILE)
'File-descriptor)
((eq typ 'INT)
'Integer)
((eq typ 'LIST)
'List)
((eq typ 'PAGETB)
'Function-paging-table)
((eq typ 'PICKSET)
'Selection-set)
((eq typ 'REAL)
'Floating-point-number)
((eq typ 'SAFEARRAY)
'Safearray)
((eq typ 'STR)
'String)
((eq typ 'SUBR)
'FAS-or-VLX-file)
((eq typ 'SYM)
'Symbol)
((eq typ 'VARIANT)
'Variant)
((eq typ 'USUBR)
'User-defined-function)
((eq typ 'VLA-object)
'ActiveX-object)))