This fixes some issues with saving '0' values and handling null