Setting `id.animation_data.action_slot = None` should always be possible, even when there is no Action assigned (that is, when `id.animation_data.action = None`). In that case `.action_slot` should already be `None`, and so writing its current value should not cause any errors. Pull Request: https://projects.blender.org/blender/blender/pulls/126827