added an explicit check that the destination is not null to prevent cryptic exception messages from the broker