Remove indentation issue.
Change error name from 'NameInvalidError' to 'InvalidNameError'.
Remove repetition.