Nit: Could this just be `if filters.get("segment_id")`?