master.py: refactor conditions to use any()
Merge pull request #4728 from hulu/master-any-conditions

master.py: refactor some conditions to use any()