title: Check if a value is an int
body: <p>So Im sending this payload to my app : </p>
  
  <pre><code>{
      "name" : "Matias Barrios",
      "age" : 123
  }
  </code></pre>
  
  <p>The problem I am facing is that when I test if <code>name</code> is a string it works perfectly. But test if <code>age</code> is an int is always returning false, no matter what I do.</p>
  
  <pre><code>if gjson.Get(spec, "name").Exists() {
              if _, ok := gjson.Get(spec, "name").Value().(string); !ok {
                  n := validator_error{Path: "_.name", Message: "should be a string"}
                  errors = append(errors,n)
              }
  }
  
  if gjson.Get(spec, "age").Exists() {
              if _, ok := gjson.Get(spec, "age").Value().(int); !ok {
                  n := validator_error{Path: "_.age", Message: "should be an int"}
                  errors = append(errors,n)
              }
  
          }
  </code></pre>
  
  <p>Could someone tell me where is the error here?</p>
  
  <p>Note - I am using this <a href="https://github.com/tidwall/gjson" rel="nofollow noreferrer">https://github.com/tidwall/gjson</a> to get the values out of the JSON.</p>