Check if actor being attacked has any of these states?

So my Parry/Counter/Dodge system is working well for all able actors. I even have it set up so that my passive character always dodges if given the command. But I've run into another big speed bump... that is... I... umm.. forgot that certain states keep them from moving. Thus, they should not be able to do any of those if being attacked.

Aside from creating huge cascades of conditional branches checking if each of the 9 actors in the game have one of the 3 'cannot act' states I have setup (so far), is it possible to use a script in the conditional branch that can check the targeted actor for any of those states?
I'm pretty sure I got it after further searching the MZ Script Call Reference and experimenting some with the console. I'm still testing this...

Conditional branch script: $gameActors.actor($gameVariables.value(n)).isStateAffected(n)
Where in the events/code are you putting the check?
The check occurs immediately after the enemy is animated to attack the actor. It looks like this:

Conditions.png

Original thread: https://forums.rpgmakerweb.com/threads/check-if-actor-being-attacked-has-any-of-these-states.151557/