static public function validateName($name)
    {
        if (null !== $name && !is_string($name)) {
            throw new Exception\UnexpectedTypeException($name, 'string, integer or null');
        }

        if (!preg_match('/^[a-zA-Z0-9_]+$/', $name)) {
            throw new Exception\InvalidArgumentException(sprintf(
                'The name "%s" contains illegal characters. Names should only contain letters, numbers and underscores.',
                $name
            ));
        }
    }