Is there a method that throws an exception if a config value is not present in appsettings? - C#