Update class exists check

I think this is backwards. Also, for some reason returning in the global scope like this doesn’t seem to work reliably. I think it's a safer bet to continue only if the class doesn’t already exist.