check for null (ContentValues.put() doesn't handle null)

May get nulls when importing data from older versions. See #392