Make comparisons with lists and sets work well, and not crash when compared with None.

Fixes #4.
Merge branch 'fix-compare'