If you use this a few times, then using isInstanceOf is not recommended as it is unwieldy. Instead you would typically do something like this:

final Matcher isWebDriverError = predicate((x) => x is WedDriverError, "an instance of WebDriverError");

and then use that instead.