Change parentViewController check

This should be checking for existence, not non-existence, for self.parentViewController