Is this line supposed to be:
```python
if k not in kwargs or kwargs[k] is None:
```