I would use `if kwargs.get('path', None):` here. Iy will make sure that path is not None and is not an empty string