The original code path could evaluate `ob.type` when `ob` was `None`. Now fixed so this should not happen. Continuation of: https://projects.blender.org/blender/blender/pulls/132846
The original code path could evaluate `ob.type` when `ob` was `None`. Now fixed so this should not happen. Continuation of: https://projects.blender.org/blender/blender/pulls/132846