Target of Target macro

Hello. I use the below macro on my paladin:
#showtooltip
/cast [mod:alt,@player] [@mouseover,help,nodead] Holy Light; [@mouseover,harm,nodead] [harm] Judgment; Holy Light

I would like for it to cast Judgement on my enemy if I have one targeted, however if I have a teammate targetted, it will cast Judgement on target of target. What is the best way to add this into my existing macro? Thanks.

You realize that will prevent you from casting Holy Light on friendly targets?

#showtooltip
/cast [mod:alt,@player] [@mouseover,help,nodead] Holy Light; [@mouseover,harm,nodead] [harm] [@targettarget,harm,nodead] [] Judgment

Yeah forgot to mention for it to be on a modifier like shift