An Attribute is an AbstractAttribute.
If someone redefine PIM attributes, he has to extend AbstractAttribute not Attribute. And in this case, if you call this method, it won't work.

Everywhere, you have to type with:
- AbstractAttribute for Attribute
- ProductInterface for Product
- ProductValueInterface for ProductValue
- CategoryInterface for Category