Fix issue of null pointer exceptions due to empty targets

Determine target where appropriate based on publication blackout
If target is null, do NOT include it in the posted metadata