Now that this is guarded against key being None, the public interface is inconsistent. If `key` is None, accessing `data` will raise an AttributeError, rather than the `ProviderHasNoKey` error that is intended to be used in this case.

The behavior of the `get_mgmt_system` method is an existing solution to this problem, so it's probably worth copying that over for getting at the provider's yaml data.