Fixes #2790

Fixes #2790
Consider this case: your DB storage represents booleans as 0 and 1, while your input gets real booleans. So this detection is not precise, although this is not as critical as the other one.