Fix the null reference exception which occurs when DependencyResolver.Current.GetService<IConfigurationSource>() returns null.

And just in case, also eliminate the possibility of null refs caused by something setting DependencyResolver.Current to null.
Fix the same null ref that can occur in the ReCaptchaValidator class.