Returns a true value if element is the last in the list.
bool isLast<V>(Iterable<V> list, V element) { return lastOrNull<V>(list) == element; }