The IsFlag() does not evaluate a variable by it's type, but it evaluates by a string that you pass to it.
If you're supplying it with text variable that says "Notflag", then as it's not "true" or "false" then the function returns "false".
If you're supplying the function with flag True, then it's first changed to text "True", then it's evaluated and it is, in fact, a flag.
Finally, if you are supplying this function, with an empty flag, then it's first changed to the empty string "", which of course it's not a flag.
you can try putting the following code
[Flag] = True OR
[Flag] = False OR
Trim([Flag])=""