Change method implementation of valid to use the new proto base classes including collections.