Fix compile errors in Xcode 6.1

A few explicit != nil expressions and optional wrapping things