Check provider existance before adding

This allow providers to be defined later as well, otherwise it would error out about a missing index.