Check dictionary value if it's empty
dictionary.ElementAt(i).Value == DBNull.Value
Check string value
if (String.IsNullOrWhiteSpace(mystring))
equals to..
if (mystring == null || mystring == String.Empty || mystring.Trim().Length == 0)
earlier version
if (String.IsNullOrEmpty(mystring) || mystring.Trim().Length == 0)
equals to..
if (mystring== null || mystring== String.Empty)