Raise ValueError if any names are invalid.
str
Brief description of these names, for use in the exception.
List
names to check.
All valid names.
If any names in names are not in valid_names.
names
valid_names
check_names()