Add explicit checks for unset values.

Otherwise they cause a good big of spam when debugging options are
enabled, making it harder to see real problems.