Why the input.getLocations().isEmpty() check?