Only calculate excludeFilter if necessary

Prevents calling keys() on excludeIds when it is None
Fixes ZEN-15541
Merge pull request #614 from zenoss/feature/ZEN-15541

Only calculate excludeFilter if necessary