notNull<T> function Null safety

Predicate<T?> notNull<T>()

Implementation

Predicate<T?> notNull<T>() {
  return (T? x) => x != null;
}