public override object ParseLiteral(IValueNode literal)
        {
            if (literal == null)
            {
                throw new ArgumentNullException(nameof(literal));
            }

            if (literal is StringValueNode stringLiteral)
            {
                if (!MultiplierPathString.IsValidName(stringLiteral.Value))
                {
                    throw new ScalarSerializationException(
                              string.Format(CultureInfo.InvariantCulture,
                                            AbstractionResources.Type_NameIsNotValid,
                                            stringLiteral.Value ?? "null"));
                }
                return(new MultiplierPathString(stringLiteral.Value));
            }

            if (literal is NullValueNode)
            {
                return(null);
            }

            throw new ScalarSerializationException(
                      TypeResourceHelper.Scalar_Cannot_ParseLiteral(
                          Name, literal.GetType()));
        }
        public override bool IsInstanceOfType(IValueNode literal)
        {
            if (literal == null)
            {
                throw new ArgumentNullException(nameof(literal));
            }

            if (literal is NullValueNode)
            {
                return(true);
            }

            return(literal is StringValueNode s &&
                   MultiplierPathString.IsValidName(s.Value));
        }