When I didn't know much about scripting I usually made my skills add an invisible state to the target. The common event would then check every battler for that state to determine if it was hit by the skill (before removing that state again).
You could use that strategy to find out if there is one target that is inflicted with both the "target marker" state and the state you originally wanted to check.
If there is none, the common event would end without doing anything (in a way like Frozen_Phoenix already suggested).
Alternatively, you can also extend the skills damage formula to set a switch or variable that your common event can check and reset. For example, if you add this before your actual damage formula:
if (b.isStateAffected( 15 )) $gameSwitches.setValue( 25 , true); (actual damage formula here)
Switch 25 would be "ON" if the target was inflicted with state 15 when you run the common event (The common event would be required to change the switch back to "OFF" of course in order to work the next time).
Keep in mind that if you use the damage formula for anything not related to calculating damage, you probably should not use the default "Auto Battle" trait for any actor that could learn the skill.
Edit: Replaced the damage formula suggestion.