_.isBool
'is it a boolean?' — and the reason it doesn't output a boolean
- obj
- *
_.isBool is a type check: feed it a value and it tells you whether that value is a Python boolean. Simple question, simple answer - with one genuinely confusing quirk that's worth understanding before you wire it in.
The quirk: its output is typed *, not BOOLEAN. The value coming out is a real Python bool - the node checks type(self.obj) is bool and returns the result - but the socket is untyped, because of how these nodes get generated. The whole underscore family is auto-generated by walking every method on the bundled underscore3 port, and isBool isn't a standard Underscore.js method, so the generator's "is this a boolean-returning method?" lookup table doesn't recognize it. Classic WIP behavior, visible right in the schema.
How it works
In the port, isBool is a straight alias of the standard method:
def isBoolean(self):
return self._wrap(type(self.obj) is bool)
isBool = isBoolean
It's an exact type check - type(...) is bool. That matters: True and False are bools, but 1 is not, even though isinstance(1, int) is true and 1 == True. If you want "is it a boolean," this is precise. If you want "is it truthy," that's a different node entirely.
The inputs that matter
Just one:
- obj - the primary input (
*), the value being inspected. Also accepts a_.CHAINto continue chaining (in which case you get the chain back, not the check result).
Output is a single *. Because it's untyped, ComfyUI won't enforce anything on the wire - plug it into a node that wants a BOOLEAN and it generally just works, since the value really is a bool.
The honest take
If you actually want a proper typed boolean out of this family, use _.isBoolean instead - it's the same check (the port aliases isBool = isBoolean), but the generator recognizes isBoolean as a standard method and gives it a real BOOLEAN output and a cleaner socket name. _.isBool is the version you'd reach for when the untyped output genuinely doesn't matter, or when you're mid-chain and just want the pass-through behavior.
Installing
Ships in comfy-ovum (MIT). ComfyUI Manager → search comfy-ovum → install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/sfinktah/comfy-ovum
Underscore nodes need no extra dependencies - the bundled underscore3 port covers them. (Pack-wide, requirements.txt includes pymediainfo, which wants system libmediainfo on Linux.)
Gotchas
One real-world trap: with the output typed *, ComfyUI treats the value as anything, so downstream type errors surface later and more confusingly than with a typed BOOLEAN. And the pack README's blanket warning - the underscore family is WIP, not for production - applies. For a one-off "is this a bool?" sanity check in a debugging graph, _.isBool is perfectly usable. For anything that lives, prefer _.isBoolean.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| objopt | * | Primary input object. Also accepts _.CHAIN to continue chaining. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| * | * | — |