(PUP-3718) Make it clear that exist?(varname) returns boolean
There was a code path that did not ensure that that the return
from exist?(varname) was a boolean. Now a test is added, and nil
result is always turned into a boolean.
This is primarily done to ensure against leaking values / object
that could be considered thruthy if this code changes. (It would
be harmeless to return nil/false or true as the code stands now,
but this commit makes it explicit that a boolean result is expected.