Sentry Issue: [POSTHOG-EU-3K](https://sentry.io/organizations/posthog/issues/3662211615/?referrer=github_integration)

```
ValidationError: {'events': [{'math': [ErrorDetail(string='"avg" is not a valid choice.', code='invalid_choice')]}]}
  File "posthog/api/insight.py", line 604, in trend
    serializer.is_valid(raise_exception=True)
  File "rest_framework/serializers.py", line 228, in is_valid
    raise ValidationError(self.errors)
```
posthog/models/entity/entity.py
self.id = data["id"]
        if not data.get("type") or data["type"] not in [TREND_FILTER_TYPE_ACTIONS, TREND_FILTER_TYPE_EVENTS]:
            raise TypeError("Type needs to be either TREND_FILTER_TYPE_ACTIONS or TREND_FILTER_TYPE_EVENTS")
        self.type = data["type"]
        order_provided = data.get("order")
        if order_provided is not None:
            order_provided = int(order_provided)
        self.order = order_provided
        self.name = data.get("name")
        custom_name = data.get("custom_name")
        if custom_name is not None:
            custom_name = str(custom_name).strip() or None
        self.custom_name = custom_name
        self.math = data.get("math")
        self.math_property = data.get("math_property")
        self.math_group_type_index = validate_group_type_index(
            "math_group_type_index", data.get("math_group_type_index")
        )
        self._action: Optional[Action] = None
        self._data = data  
        if self.type == TREND_FILTER_TYPE_EVENTS and not self.name:
            
            self.name = str(self.id)
    def to_dict(self) -> Dict[str, Any]: