Correctly compare mask to None
Merge pull request #1026 from stefanv/bugs/watershed_none_comparison

Correctly compare mask to None