// IsFooBar being a boolean, we check if it's different from true and from false if (x.IsFooBar != true && x.IsFooBar != false) { return "error"; }
x.IsFooBar is juste a regular bool