title: jQuery if statement always evaluates to true
body: <p>I am checking to see if a form has a "file" input and if it has a vlue. The DOM goes like:</p>
  
  <pre><code>&lt;form id="form123"&gt;
      &lt;div class="row"&gt;
          &lt;input type="file"&gt;
      &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Console</p>
  
  <pre><code>console.log($(formId).find('input[type = "file"]').val().length)
  // prints 0
  </code></pre>
  
  <p>if statement</p>
  
  <pre><code>if ($(formId).find('input[type = "file"]').val().length &gt; 0) {
  // run function
  </code></pre>
  
  <p>It always runs the function!</p>