Check vc is not nil to prevent infinite recursion

If vc is nil then '[[vc presentedViewController] presentingViewController] == vc' returns true, so this function recurses endlessly.

Steps to reproduce:

1. Create a new project in Xcode, choose iOS > Single View Application
2. In the generated view controller class, set a breakpoint in -viewDidLoad on the call to [super viewDidLoad]
3. Run the app in the simulator
4. When the breakpoint is hit, type `pvc` in the console