hasAttr method