Hi Rohit,
Sorry for my late reply. I think I ran into this bug earlier and fixed it on the active branch. I will test this scenario on the active branch and let you know for sure. If not, I will have to fix this bug.
The only way to avoid this issue is to use a non-zero length string and then trim the value when you read it on the client and the server. I know that is a hackish workaround.
This issue will go away when 2.4-M3 is released. In the meantime, can you enter this as an issue so that it does not fall through the cracks.
Thanks
Sohil