Performance improvements when collections are empty