Error while updating field value in API integration

When i update one field in Other API i’ve written code to update that field in ERPNext also…But somehow it does not seem to be working.

data= frappe.form_dict
there may be some fields which are null…this can be a cause of error cause in python it should be None.

how do i resolve this