## Bug description

The following filter fails with a 500 internal error.

![2021-02-04_12-07](https://user-images.githubusercontent.com/148820/106877644-a9f4ce80-66e1-11eb-8320-87bb213bdde2.png)


## Expected behavior

Error is shown to user about invalid regular expression.

Note no errors shown on the page as well.

## How to reproduce

1. Go to events
2. Add filter "Current URL matches regular expression ?*"
3. See infinite loading screen / error

## Environment

- [x] PostHog Cloud
- [x] self-hosted PostHog, version/commit: _please provide_

## Additional context

Note this can also happen when filtering by events.

#### *Thank you* for your bug report – we love squashing them!

posthog/utils.py
try:
        ping = get_client().get("@posthog-plugin-server/ping")
        return bool(ping and parser.isoparse(ping) > timezone.now() - relativedelta(seconds=30))
    except BaseException:
        return False
def get_redis_info() -> Mapping[str, Any]:
    return get_client().info()
def get_redis_queue_depth() -> int:
    return get_client().llen("celery")
def queryset_to_named_query(qs: QuerySet, prepend: str = "") -> Tuple[str, dict]:
    raw, params = qs.query.sql_with_params()
    arg_count = 0
    counter = count(arg_count)
    new_string = re.sub(r"%s", lambda _: f"%({prepend}_arg_{str(next(counter))})s", raw)
    named_params = {}
    for idx, param in enumerate(params):
        named_params.update({f"{prepend}_arg_{idx}": param})
    return new_string, named_params
def get_instance_realm() -> str:
    """
    Returns the realm for the current instance. `cloud` or `hosted`.
    """
    return "cloud" if getattr(settings, "MULTI_TENANCY", False) else "hosted"
def flatten(l: Union[List, Tuple]) -> Generator:
    for el in l:
        if isinstance(el, list):
            yield from flatten(el)
        else:
            yield el
def get_daterange(