Replace NULL with 0 for empty field values.