```
 override func prepareForSegue(segue: UIStoryboardSegue?, sender: AnyObject?) {
          if (segue && segue!.identifier == "showDetail"){  //this line has error
            var selectedIndexPath : NSIndexPath = self.tableView.indexPathForSelectedRow()
            var detailViewController : DetailViewController = segue!.destinationViewController as DetailViewController
            detailViewController.toDoData = toDoItems.objectAtIndex(selectedIndexPath.row) as NSDictionary
        }

```

I am very newby, it may be very simple error, but I need well explained answer.
I have Xcode error 

> 
> Optional type 'Bool' cannot be used as a boolean; test for '!= nil'
>  instead
> 
> 
> 

for the second line `segue && segue!.identifier`.

I am watching youtube video to follow steps for the to-do list.