Binary operator '!=' cannot be applied to operands of type 'NSError' and 'NilLiteralConvertible' <p>I have the following code :</p> <pre><code>if ((error) != nil) { print(error, terminator: "") } </code></pre> <p>in my Swift program (converted to Swift 2 from Swift 1) </p> <p>But Xcode is complaining</p> <blockquote> <p>Binary operator '!=' cannot be applied to operands of type 'NSError' and 'NilLiteralConvertible'</p> </blockquote> <p>What is the issue with the above line?</p>