Small improvement in checking for empty URLs