`type(kwargs) is dict` check shouldn't be necessary since, afaik, if you use ** kwarg expansion it will always be a dict.