when `cls` can be `None`?