Validation tests

* Added integration tests for the member validation functions (that would have caught #719...)
* Fixed Mongo error that happens when there is no activitystore for map-reduce