magento2 – On saving data for guest user error occurred in Magento 2

I have created a module to save some custom data from checkout form using AJAX.

The module works perfectly for logged in user but for guest user it gives me this error.

{"message":"The "9kUx9DorBmt4d9e55rIFBfjGNibrWojw" value's type is invalid. The "int" type was expected. Verify and try again.","trace":null}

Any help is appriciated.