Detecting that a specific object has been removed from the scene

Hy everyone,
I registered an object in a property pointer and I would like to know if there is an event that is triggered every time an object is deleted so that if the frame is deleted from the scene the script can detect it and reset the parameters.

class ArmatureProp(bpy.types.PropertyGroup):
       obj : bpy.props.PointerProperty(type=bpy.types.Object)

Good day,

import bpy
context = bpy.context


class ARMATURE_PG_myprops(bpy.types.PropertyGroup):
   obj: bpy.props.PointerProperty(type=bpy.types.Object)


def check_ob_in_scene(scene):
    ob = scene.arm_props.obj

    if ob is not None:
        if ob.name not in scene.objects:
            scene.arm_props.obj = None


def register():
    bpy.utils.register_class(ARMATURE_PG_myprops)
    bpy.types.Scene.arm_props = bpy.props.PointerProperty(type=ARMATURE_PG_myprops)
    
    if not check_ob_in_scene in bpy.app.handlers.depsgraph_update_post:
        bpy.app.handlers.depsgraph_update_post.append(check_ob_in_scene)
        

def unregister():
    if check_ob_in_scene in bpy.app.handlers.depsgraph_update_post:
        bpy.app.handlers.depsgraph_update_post.remove(check_ob_in_scene)

    bpy.utils.unregister_class(ARMATURE_PG_myprops)
        

register()
context.scene.arm_props.obj = bpy.data.objects.get("Suzanne", "")

Hy,
Thanks for your code. I didn’t know yet.

Good day,