Raise error if name is undefined