Validates the name property