Yes, I agree.  When lower layers pass a null body it somehow gets mapped to the 'undefined' string.  Perhaps during the creation of the XPCOM object but that's outside of my expertise.  I could probably debug and find out but ideally someone might just know?  I might argue for that to be a separate patch however.