Add error checking for a common condition which results in no results being returned