I have the following code that manipulates a dictionaries value. The dictionary list is fieldValues. The purpose is that I check if the value contains a certain string and if it does, I replace it with the value of another dictionary value.
foreach (var val in fieldValues)
if (val.Value.Contains(("signer" + sig.Value).ToString()))
fieldValues[val.Key] = val.Value.Replace((sig.Value).ToString(), (sig.Key).ToString());
Although this shouldn't happen, sometimes the dictionary value is null and the program crashes. I just want to know how I should handle the null dictionary values so that the foreach lp