Ah, JavaScript's type coercion explained with toilet paper. Pure genius.
Non-zero value: Has toilet paper. Works as expected.
0: Empty roll but still there. Technically exists but utterly useless.
null: Just the holder. Someone deliberately removed the toilet paper.
undefined: No toilet paper holder at all. Whoever built this bathroom forgot a critical component.
And yet somehow all of these evaluate to false in an if statement. JavaScript, where the rules are made up and the types don't matter.