 			? UITableViewAutomaticDimension
 			: super.tableView(tableView, heightForRowAt: superIndexPath(for: lastCellIndexPath))
 		// Use default height when last cell is not on the screen.
-		guard tableView.indexPathsForVisibleRows?.contains(lastCellIndexPath) == true
+		guard tableView.indexPathsForVisibleRows?.contains(lastCellIndexPath) ?? false
 			else { return }
 		let previousRowFrame = tableView.rectForRow(at: IndexPath(row: lastCellIndexPath.row - 1, section: lastCellIndexPath.section))
 		// Get height of empty spaces to fill

				// Calculate height of last cell
				DispatchQueue.main.async {
					self.updateFillUsingLastCell()
					self.refreshTableView()
				}
			}
		}

                         section: (indexPath as NSIndexPath).section)
    }
	
	fileprivate func refreshCellHeights() {
		tableView.beginUpdates()
		tableView.endUpdates()
	}
