Hardening against nulls for deserialization.

When one attempts to populate data structures via
deserialization, nulls tend to show up in unlikely or
"impossible" places. Now there are a few fewer.
Merge pull request #2493 from paulp/pr/null-hardening

Hardening against nulls for deserialization.