ComfyUI Node

is null

'Why is this node silent?' — that's usually None hiding in your workflow

By StableLlama·Created about a year ago·Updated 4 days ago· 48
is null
  • value
  • is_null

Every ComfyUI user eventually hits the "silent nothing" - a node that runs, goes green, and produces nothing you can see, and you have no idea whether the input was even there. A lot of the time the answer is None: a value that exists but is empty of content, the Python equivalent of an empty hole. is null is the node that catches it. It takes any value at all and answers one question: is this None, yes or no?

It's part of Basic data handling, StableLlama's zero-dependency utility pack. IsNull is one of those nodes that looks trivial until you build a workflow with optional inputs - and then it's the difference between a branch that runs and one that silently does nothing.

How it works

The check is Python's identity test: value is None. Not equality, not falsiness - it specifically asks "is this the None object?" That precision matters, and it's the thing most people get wrong the first time.

  • NoneTrue
  • "" (empty string) → False
  • 0, 0.0, [], {} → all False

So IsNull does not answer "is this prompt empty?" or "is this input unset-ish?" An empty string is a perfectly real value; only None is None. If you want to test for an empty string, you need the pack's string length or string comparison nodes instead - the author himself made exactly this point in an r/comfyui thread where someone wanted to abort a run when a text field was empty.

The input and the output

  • value (input, ANY) - plug in literally anything: a STRING, an INT, a model, a mask, an unconnected-looking output.
  • is_null (output, BOOLEAN) - True when the input is None, False otherwise. Wire it straight into a flow-control node (the pack's if/elif/else, continue flow, or any boolean logic) to branch on the result.

Installing it

Install Basic data handling via ComfyUI Manager (search "Basic data handling"), or:

cd ComfyUI/custom_nodes
git clone https://github.com/StableLlama/ComfyUI-basic_data_handling

Restart ComfyUI. No dependencies, no models, nothing that can break your Python environment.

Troubleshooting

  • "I tested an empty string and got False." Working as designed - read above. Reach for string-length instead. This is the single most common confusion with this node.
  • "The value is None but I can't get it to be True." If a node's output is optional and nothing was connected, ComfyUI often just skips the input entirely rather than handing the node a literal None - so the node may never run at all. In that case the problem is upstream wiring, not IsNull. A cleaner pattern is to give the optional value a real default and check that, or gate the branch with continue flow before the value is consumed.
  • Pair it with the pack's own flow nodes. The natural move is IsNull → if/elif/else: if the value is null, route to a fallback; otherwise pass the real value through. That's the pattern that turns "silently nothing" into "explicitly handled."
CategoryBasic/comparison

Inputs (1)

NameTypeDefaultDescription
value*

Outputs (1)

NameTypeDescription
is_nullBOOLEAN