Add helper function variant_bool

Signed-off-by: Jiří Janoušek <janousek.jiri@gmail.com>