typeof(app.activeDocument) === "undefined"
This is an *error* in Extendscript (Error 1302: No such element). I don't believe it should be, but if I'm supposed to do something different in Extendscript I am all ears.
Thank you and I apologise. I simply followed the Adobe "support wizard" and it dumped it here, and I admit to not paying attention to the forum it posted my question in.