Check whether the provider is defined before (trying to) add it.
indentation
Merge pull request #13 from syphernl/fix_providerregistration

Check provider existence before adding