Added check for empty set
Removed trailing whitespace
Merge pull request #224 from khellang/empty-set-check

Check for empty set