writeToParcel message methods and additional safety checks for null maps