you prob want something like:

```
if (year is not None or month is not None or not isinstance(year, datetime):
  warn.....
```

to catch when someone call ``get_optionos_data(dt)`` (e.g. calling w/o the keyword argument and it is the wrong type)

alternatively you can just do:

```
try:
    year = dt.year
    month = dt.month:
except:
    warn.....
```