More functional decodeMessageMap
Better check in matching in upcastAny