Explicitly check for nil (now required with Xcode 6 beta 6)