why not using isinstance?

```
if isinstance(date, Date):
    return Date
```