rewrite all '$SOME_VAR' test expressions to '($SOME_VAR != null && $SOME_VAR != "")'
mentioned in commit e6584720