Better treatment of nil values when storing shortcuts as dictionaries.

This makes it possible to make a difference between “shortcut not
set, use default” and “shortcut set to none”.