Check the class object not its name.