handle null will payloads

I had a situation where I was trying to connect with a null payload will message (to clear the retained topic) but found there were issues making the connect packet. Here is my fix and a test for it.