$ 0 0 As you saw it is called multiple times - and this is by design. Why not do the check once when you "fill" the variable?