Easy way to test optionals in Swift