Guard against the absence of path segments.