The condition, in any way possible has to evaluate to true for the if-statement to run. Meaning you can either just leave it as condition or condition == true. For checking if it’s false or nil, you can simply do not condition or condition == false. In both of these, the former is more concise so you’ll see more uses of that.
Boolean is the type of the values false and true . Both nil and false make a condition false; any other value makes it true.
So any value can be used as a boolean/condition. In situations where something acts as e.g. a condition in an if statement or while loop, the value is treated as true or false as described above.