Added functionality to determine if a collection already exists.