Catch the no result exception when fetching from database