Empty pref file is an empty object, not an error.

This is a fix for #7220 (errors caused by a prefs file being empty).

This also fixes #7229 which was duped to #7220.