Fix for null values in inserts and updates