Make sure `kwargs=None` is properly handled. Fixes #16945.

heh, I  thought it was a typo