Determine if fcurves cannot be evaluated from Python
ID.path_resolve
Probably not the loop to use (action in bpy.data.actions) Need to know for what object(s) the action is for. For example all pose bone fcurves will be invalid for the Cube. If the object is an armature it will require the named pose bone.
Similarly to
Evaluate FCurve without keyframes won&#39;t work
can use Object.path_resolve(FCurve.data_path) in a try / except clause to search for what will be seen as invalid fcurves.
Have left out the &quot;obvious&quot; test of looking to see which action is assigned to objects animation data
Is the object that is associated with an action selected?
action is ob.animation_data.action

or searching for it in the Strips of NLA Tracks. Something like
any(s.action is action for t in ob.animation_data.nla_tracks for s in t.strips) 

Also look at the Action.id_root which is set when adding a new action to a particular data type using the UI.  No suitably rooted paths error when trying to set action on object
Test script, checks all actions against all objects, meshes, shape keys and materials and counts the fcurves  valid for each.
import bpy
from itertools import product
context = bpy.context
prev = None
for action, ob in product(
        bpy.data.actions, 
        sum(
                (
                bpy.data.objects[:], 
                bpy.data.meshes[:],
                bpy.data.materials[:],
                bpy.data.shape_keys[:],
                ),
                []
            )
        ):
    if action is not prev:
        print(&quot;-&quot; * 44)
        print(f&quot;Action : {action.name}&quot;)
        n = len(action.fcurves)
        print()
        print(f&quot;\tID {action.id_root}&quot;)
        print(f&quot;\tFcurves : {n}&quot;)        
        prev = action
    def is_valid(fc):
        
        try:
            ob.path_resolve(fc.data_path)
            return 1
        except:
            return 0
    v = sum(is_valid(fc) for fc in action.fcurves)
    print(f&quot;\t{ob.bl_rna.identifier} : {ob.name}  Valid : {v} ({100 * v / n}%)&quot;)
print()   

Test run, quickly added some keyframes to some objects, a mesh, an armature object a material and a shape key.  The &quot;CubeAction&quot; on the cube action was LocRotScale, which will be valid on any object.
--------------------------------------------
Action : ArmatureAction

    ID OBJECT
    Fcurves : 10
    Object : Armature  Valid : 10 (100.0%)
    Object : Camera  Valid : 0 (0.0%)
    Object : Cube  Valid : 0 (0.0%)
    Mesh : Cube  Valid : 0 (0.0%)
    Material : Material  Valid : 0 (0.0%)
    Key : Key  Valid : 0 (0.0%)
--------------------------------------------
Action : CameraAction

    ID OBJECT
    Fcurves : 3
    Object : Armature  Valid : 3 (100.0%)
    Object : Camera  Valid : 3 (100.0%)
    Object : Cube  Valid : 3 (100.0%)
    Mesh : Cube  Valid : 0 (0.0%)
    Material : Material  Valid : 0 (0.0%)
    Key : Key  Valid : 0 (0.0%)
--------------------------------------------
Action : CubeAction

    ID OBJECT
    Fcurves : 6
    Object : Armature  Valid : 6 (100.0%)
    Object : Camera  Valid : 6 (100.0%)
    Object : Cube  Valid : 6 (100.0%)
    Mesh : Cube  Valid : 0 (0.0%)
    Material : Material  Valid : 0 (0.0%)
    Key : Key  Valid : 0 (0.0%)
--------------------------------------------
Action : CubeAction.001

    ID MESH
    Fcurves : 1
    Object : Armature  Valid : 0 (0.0%)
    Object : Camera  Valid : 0 (0.0%)
    Object : Cube  Valid : 0 (0.0%)
    Mesh : Cube  Valid : 1 (100.0%)
    Material : Material  Valid : 0 (0.0%)
    Key : Key  Valid : 0 (0.0%)
--------------------------------------------
Action : KeyAction

    ID KEY
    Fcurves : 1
    Object : Armature  Valid : 0 (0.0%)
    Object : Camera  Valid : 0 (0.0%)
    Object : Cube  Valid : 0 (0.0%)
    Mesh : Cube  Valid : 0 (0.0%)
    Material : Material  Valid : 0 (0.0%)
    Key : Key  Valid : 1 (100.0%)
--------------------------------------------
Action : MaterialAction

    ID MATERIAL
    Fcurves : 2
    Object : Armature  Valid : 0 (0.0%)
    Object : Camera  Valid : 0 (0.0%)
    Object : Cube  Valid : 0 (0.0%)
    Mesh : Cube  Valid : 0 (0.0%)
    Material : Material  Valid : 2 (100.0%)
    Key : Key  Valid : 0 (0.0%)