Okay, looked a bit deeper into the whole thing.

Suggesting bitiwise and stuff is fair enough, but the reason why it's done this way is because it is done like this in legacy. As simple as that. And since we won't change the way data is stored, we won't change those tests. Yes, null should be different from 0, but we won't rewrite this.

But yes, we could use bitwise operator without changing data, since we only have the values 1 & 2. I'm not 100% comfortable with this, since the business logic will be quite different between legacy and the legacy storage engine... I'm not sure we really want this.

We are gonna do a test in a different commit.