there is still a risk that the provider is null or the name of the provider could be null.