Add check for base class of the Command