Returns this if it satisfies the given predicate or null, if it doesn't.
predicate
T? takeIf(bool Function(T obj) predicate) { if (predicate(this)) { return this; } return null; }