Fix a bug on autorotate api for versions less than 6.0

If one of the left or right viewcontroller is nil this result would not
work as expected. Its checked if theres as left or right viewcontroller
before asking if they can be rotated.