Fix any() when the collection is empty and some formatting.

Found problems with any() when the collection is empty.

This is now fixed and a test has been added to check against that.