Rather than checking for name is PyROOT, how about checking for `isinstance(x, ROOT.TROOT)`? It's conceivable that someone somewhere might want to name a directory PyROOT..