Better handling of empty fields when saving items

Refs #14 and #16