Test if thread's class exists before instantiating