correct logical condition detecting if white first

If the problem has no solution, the condition must be false