Correctly compare mask to None