title: params[...] comparison raises "undefined method `>' for nil:NilClass" error in ruby on rails
body: <p>I want to check below:</p>
  
  <pre><code>if params[:hidval] &gt; "0"
  OR
  if !params[:hidval] &lt; "1"
  </code></pre>
  
  <p>But it gave me error below:</p>
  
  <pre><code>undefined method `&gt;' for nil:NilClass
  </code></pre>
  
  <p>How do I check above conditions in ruby on rails?</p>