code: function instanceOf(validatedObject, expectedClass, errorText) {
    if (!(validatedObject instanceof expectedClass)) {
      throw new ValidationError(
        errorText || `Validated object is not an instance of ${expectedClass.name}`
      );
    }
    return validatedObject;
  }
docs: Checks value to be an instance of a given class
  @param validatedObject
  @param {class} expectedClass
  @param {string} [errorText] - message for error thrown if validation fails
  @returns {Object} validatedObject