Fix tests.
Factor out value_asbool function.