Helper function to test if an object is a DioError
DioError
bool isDioError(Object error) => error is DioError;