Returns true if the exception indicates a stale element was found.
typedef IsStaleException = bool Function(Object exception);