Earth Shield code help

I am trying to add Earth Shield in the premacro section to only cast if focus does not have it. I have tried
/cast [@focus] Earth Shield but cant find the code to only apply the buff if it is not present. I saw a similar thing with immolate for a warlock macro where NULL was in it but that isn’t working for this. Any suggestions? Or is this even possible?

Yeah… I could be wrong. The Null function hasn’t worked in awhile. The only thing I could think of is to answer your question would be to put a mod key on the cast function

such as:

/cast [@Focus][mod:“Key”] Earth Shield

Change “Key” to alt, ctrl, shift, or whatever you want to use without the quotes. Earth Shield only lasts for 10 minutes so maybe save it for boss fights. Also get your UI show what buffs are on the tank. Pretty much the only thing I could think of to resolve your problem. I don’t know if you can cast a buff on someone only if it doesn’t already exist. That’s something I’ve been trying to do with scripts for quite awhile