MockStore: introduce exists() method to limit code duplication