The “exists” function can be used to test whether a list exists. The “fieldtype” function can be used to check whether any element reference (list or non-list) exists.
For consistency only, use a “fieldtype” check rather than an “exists” check to check for the presence of any list / non-list element.
For example:
IF FIELDTYPE (inRef.[1]) IS NOT NULL THEN
IF FIELDTYPE (inRef.aNamedChild) IS NOT NULL THEN