MediaWiki talk:MassCategorization/code.js

try catch todo
I'm not sure at what level you discover that there are no categories, but you could do something like  where x is the parent to the categories object. Doing it like this makes sure its defined before attempting to use it. A similar example might be this which is used to test for the console global which isn't always found in older versions of IE