fix editing of NULL values (fixes 0 to NULL, and fixes setting of NULL values in postgres)