Check the truthiness of the value to ok($bool) only once

Fixes #482