Ensuring all empty dates set to NULL in database. Fixes #225