add validation to the literal type being parsed