Check if view is null in getTopParent