Added checks that collections are valid