Simplify logic with De Morgan's law
Merge pull request #981 from mc10/lint

Simplify logic with De Morgan's law