Fix a few null checks in savedata.

Fixes #2456.