var x = nil if x == nil { //Do something }