Fix bug with decoding empty message types. Add test for the same.