从可空对象转换为非空对象(Objective-C)

Sam*_*man 4 nullable objective-c xcode6.3

我一直在使用Xcode 6.3中新的可空性

但是,我遇到了这样的问题

[Object doSomethingWithNonNullParam:otherObject.nullableProperty];
Run Code Online (Sandbox Code Playgroud)

什么是最好的解决方法如果我有信心otherObject.nullableProperty不是nil

Sam*_*man 9

我觉得这里演员合适吗?

[Object doSomethingWithNonNullParam:(OtherObject *_Nonnull) otherObject.nullableProperty];