title: "Cannot force unwrap value of non-optional type 'Int'" error?
body: <pre><code>func decideLeapYear(year: Int) -&gt; Bool{
  var lyear: Bool = false
    if(year&lt;1582){
      if(((year/4)%1)==0){
          lyear = true
      }
    }
    else if(year&gt;=1582)
    {
      if(((year%4)==0) || (year%400==0) &amp;&amp; ((year%100)!=0)){
        lyear = true
      }
    }
  
  return lyear
  }
  </code></pre>
  
  <p>At the end of the <code>if</code> statement in the <code>else if</code> statement, Xcode throws this error: </p>
  
  <blockquote>
    <p>Cannot force unwrap value of non-optional type 'Int' </p>
  </blockquote>
  
  <p>when it reaches the statement:</p>
  
  <pre><code>((year%100)!=0))
  </code></pre>
  
  <p>Can anyone explain why and how I can fix this?</p>