What about having a helper method on GitException, in order to make code like this more terse? Something like `static GitException.isKind()`:

    static GitException.isKind(dynamic exception, String kind) {
        return exception is GitException && exception.errorCode == kind;
    }