Indeed this condition is not needed, but it can not be replaced by "hasAttributes"