When the subtype of a custom property is set programmatically to something that isn't in the subtype enum of this operator, attempting to edit it will throw an error. This check should avoid that, by simply not setting the subtype if it's not in the enum, resulting in a default subtype of NONE. This is the second attempt at #112582, which I broke when messing with branches. Pull Request: https://projects.blender.org/blender/blender/pulls/114003