You set checking like that within your function, just like ULX does.
ULib's command object functions are extremely powerful, but such a filter addition would generally be too niche/overkill, as I'd guess majority of code functions, both custom and ULX, don't require it.
Not to say that Stickly Man, MrPres, and Megiddo may disagree with what I think they might say.
As for ULX, within any functions that need it, we also use ulx.getExclusive to determine other player states set by ULX such as jailed, mauled, frozen, etc.