I use the following code to fetch a random date from the API. The api returns an image URL. If there is no image URL for this date, I want to keep fetching dates until it retu