While user JavaScript code may need to use these things, in general I think addons should not use these things. Addons should be designed to be self-contained and not depend on external variables or object types. This improves their design and makes them more flexible. So I have to ask, what do you need it for and can't you design the addon a different way? I think it would be a better design if you did.