Make sure attribute is registered before modifying it.