Solidworks Dimension Check

Is there any way to check if a dimension exists eg. (x step@top sketch), and pass it through as true or false?

SolidworksApi macros