Add explicit check for nullptr to target_announce_attach Lancelot pointed out that target_announce_attach was missing an explicit check against nullptr. This patch adds it.