check class inherits