protect against None in target

Change-Id: I672417fdf389a0df69fc3de9431dabe5852710f3