Python modifier error handling
Well the easy way would be to use a try-except catch

This would skip the meshes where errors happen
print their names and reselect them after deleting the rest:

import bpy
wm = bpy.context.window_manager
act_obj = bpy.context.active_object
union_list = []
passed = []
for sel_obj in bpy.context.selected_objects:
    if sel_obj.type == 'MESH':
        if sel_obj != act_obj:
            try:
                bpy.ops.object.modifier_add(type="BOOLEAN")
                union_list.append(sel_obj)
            except:
                print("\n"+sel_obj.name)
                passed.append(sel_obj)
                sel_obj.select = False

k=0
union_list_len = len(union_list)
wm.progress_begin(0, union_list_len)

for mod in act_obj.modifiers:
    if mod.type == "BOOLEAN":
        print(k,union_list_len,union_list[k].name)
        wm.progress_update(k)
        mod.operation = "UNION"
        mod.object = union_list[k]
        try:
            bpy.ops.object.modifier_apply(modifier=mod.name)
        except:
            print("\n"+sel_obj.name)
            passed.append(sel_obj)
            sel_obj.select = False
        k=k+1
act_obj.select = False
bpy.ops.object.delete()
wm.progress_end()
for obj in passed: obj.select = True


hope it helps, Teck-Freak