Delete Object with Zero Verts
Remove all zero vert mesh objects from scene.
Script below will remove all zero vert mesh objects from the scene.  For your use case could instead look only over context.selected_objects.
import bpy
scene = bpy.context.scene

empty_meshobs = [o for o in scene.objects
                 if o.type == 'MESH'
                 and not o.data.vertices]
                 
while empty_meshobs:
    bpy.data.objects.remove(empty_meshobs.pop()) 

Another alternative is to not split if the selected vertices are all of total.
sel_verts, _, _ =   context.object.data.count_selected_items()
if sel_verts &lt; len(context.object.data.vertices):
    bpy.ops.mesh.separate(type='SELECTED')