Returns this value if it satisfies the given predicate or null, if it doesn't.
predicate
Any? takeIf<T>(bool Function(Any) predicate) => predicate(this) ? this : null;