#18 Tidied up lastIndexPathForView to minimise duplication and return nil if the supplied container is not a UITableView or UICollectionView, or empty