Handles null values in MessageType and ContentType metadata fields when publishing external integration events.

Fixes #423