Check whether there are any URLs before iterating over them.