8.x
This issue is caused by one or more of the existing rules having invalid (aka null) entries. These can be caused by either virtual machines or hosts referenced in them, which have been removed from the vCenter inventory.
The references for these objects can get stuck in the affinity rule, making it invalid.
To fix the issue: