Fix static analyzer warnings about nil values in dictionary