CAUTION: this test only detects the presence of any attribute, which is usually not what is required. It is more common to check for the presence of a particular attribute by using a matching clause of the form:
has_my_attribute(_{my_attr:Attr}) ?- nonvar(Attr).
Success: meta(X{a}). suspend:(X>0), meta(X). Fail: meta(atom). meta(X).