Some properties can be None and this should be indicated by declaring them with typing.Optional.
Properties do have an is_never_none attribute, but it's mostly used for properties that have an equivalent 'falsey' value, such as string properties that will be '' when there is no value set. Additionally, is_never_none can't be trusted, since bpy.types.Object.image_user has is_never_none, yet can actually be None.
I don't know if there's actually a way to tell if a property is optional. The is_required attribute sounds promising, but appears to only be used for function parameters.
Some properties can be None and this should be indicated by declaring them with
typing.Optional.Properties do have an
is_never_noneattribute, but it's mostly used for properties that have an equivalent 'falsey' value, such as string properties that will be''when there is no value set. Additionally,is_never_nonecan't be trusted, sincebpy.types.Object.image_userhasis_never_none, yet can actually beNone.I don't know if there's actually a way to tell if a property is optional. The
is_requiredattribute sounds promising, but appears to only be used for function parameters.