MZ Is it possible to run a custom unarmed script like this with Visustella's skill Core?

From what I understand from poking around on here for a bit now is that Visustella's skills core makes it possible to run scripts like this:

<JS Skill Enable>
enabled = user.isStateAffected(42);
</JS Skill Enable>

And that with base RPG Maker MZ functionality(?) I can also run a script like this:

$gameActors.actor(x).isWtypeEquipped(n);

So my idea is that I should be able to check to see if the player/party member is unarmed with something like, "$gameActors.actor().isWtypeEquipped();" and then do an "If-then" statement such that if the actor's weapon type is "undefined" then "<JS Skill Enable>" for, "unarmed," skills that are only available to the player if the player doesn't have any weapons equipped, in the same way that MZ natively allows you to set weapon/equipment requirements for certain skills to be accessible. What do you guys think? Would something like this be possible? I'm not quite sure how to do "If-Then's" like this in MZ, nor am I quite sure I'm whether or not this would work?
So my idea is that I should be able to check to see if the player/party member is unarmed with something like, "$gameActors.actor().isWtypeEquipped();" and then do an "If-then" statement such that if the actor's weapon type is "undefined" then "<JS Skill Enable>" for, "unarmed," skills that are only available to the player if the player doesn't have any weapons equipped
you can (not exactly that way), but you dont need to. if your condition is that the battler has no weapons equipped, then you can call weapons() and check if its empty.

Code:
<JS Skill Enable>
enabled = !user.weapons().length;
</JS Skill Enable>
you can, but you dont need to. if your condition is that the battler has no weapons equipped, then you can call weapons() and check if its empty.

Code:
<JS Skill Enable>
enabled = !user.weapons().length;
</JS Skill Enable>
Oh damn, that is a lot simpler, lol. Thanks!
You can go even simpler than that:

JavaScript:
enabled = user.hasNoWeapons()
You can go even simpler than that:

JavaScript:
enabled = user.hasNoWeapons()
Ngl, it's so simple that I genuinely feel a bit silly for not thinking of that now, lol. Much simpler than my original idea of how to achieve the same effect!

Original thread: https://forums.rpgmakerweb.com/threads/is-it-possible-to-run-a-custom-unarmed-script-like-this-with-visustellas-skill-core.182171/