Check index for table view selectedRow