why is it necessary to verify the class type? Isn't  this method only called to create a Standalone Gratuity?