`if debug_nil` at the end is equivalent to what you wrote and is much more readable.  Note that nil and false both evaluate to a "falsy" value in Ruby.