title: How to detect if var is a string
body: <p>I am having a bit of trouble using an if statement to detect if my numericupdown object is a string so I don't use a decimal variable to adjust it. I saw there was a type of commmand, but I am having trouble using it. Here is what I am looking at:</p>
  
  <pre><code>if(typeof sentNUD.Value == string)
  {
         //Do string arguments here
  }
  else
  {
          //do decimal arguments here
  }
  </code></pre>
  
  <p>The syntax of the if statement is wrong though and I get an error. How do I set up that if statement correctly? I tried looking around a bit, but I am having trouble understanding how to do this correctly. Thank you.</p>