I think this is the crux of the problem. OP's confusion would be addressed by
var foo someType = someType.nil var bar someInterface = foo if (bar == interface.nil) // prints false without confusion
I think this is the crux of the problem. OP's confusion would be addressed by