Wouldn't it be better to say:

```python
if email is None:
    email = kwargs.get('username')
```

If `email` gets passed in, we should just ignore the other arguments. Otherwise, the precedence is wrong.