Checking whether viewController is not nil before pushing it.