Patch 3 contains the changes discusses about the #if statement. Mainly, if a variable is referenced alone within an #if expression then the variable is evaluated as if strict mode is false. So the following examples will work (Won't throw exceptions):
#if($bogus && $bogus.foo) // Short circuit, and bogus has foo
#if($val == "junk" || $bogus) // Works if $val is defined
#if($bogus1 || $bogus2)
The following will throw an exception
#if($bogus == "junk")
#if($bogus > 4)
So, I have mixed feeling about this solution.. but I think I can live with it. This is a special case, but the special case sort of stands out, and may actually be somewhat intuitive... If someone wants to actually test if a variable exists then they can use #if($foo != $NULL). and I like the ability to do #If($foo && $foo.bar).
Unit tests are included.
If this looks good I'll submit a patch for docs.