You can use an in-line if statement to check if it is null before attempting to use the object.
If(String.IsNullOrEmpty(YourDictionary("YourKey").ToString),String.Empty,YourDictionary("YourKey")
This will change any null/missing dictionary values to be an empty string wherever you’re putting it. Note that it doesn’t actually change the dictionary, it just changes the value when using it in the one in-line statement.
Another note is that if the key is missing (e.g. “YourKey” doesn’t exist in the dictionary) then you will get a different error. In that case, you need to search if KeyExists before referencing the key
A dictionary is a much better data type to use though. It is much quicker & less resource intensive if you are planning on using a “lookup table” instead.