Refactors suggested by @HugoGiraudel

Because `value = if condition then true else false` is basically equal to `value = condition`.