Fix exception if failure after all retries

Handle scenario where all retires fail, data would be none, so check for
this.