change equivalent form of `nil` to "undefined"
optimize `cond` output