If this collection does not provide a method for checking for the presence of this key, you will have to wrap the code in a block try..catch.
try{
folderBrowserDialog1.SelectedPath = (string)Properties.Settings.Default["SelectedPath"];
}catch(System.Configuration.SettingsPropertyNotFoundException)
{
folderBrowserDialog1.SelectedPath = ""; // or whatever is appropriate in your case
}
If the property Defaultimplements an interface IDictionary, you can use the method ContainsKeyto verify that the given key exists before trying to access it, for example:
if(Properties.Settings.Default.ContainsKey("SelectedPath"))
{
folderBrowserDialog1.SelectedPath = (string)Properties.Settings.Default["SelectedPath"];
}else{
folderBrowserDialog1.SelectedPath = ""; // or whatever else is appropriate in your case
}