! Make sure preferences actually exist before trying to do something with them (partial fix for #1941)

Signed-off-by: Michael Eshom <oldiesmann@oldiesmann.us>