Allow any hashable type as an ID. Rename _extract_uuid() to _extract_id().