isNullable<T> function
Returns true if T is a nullable type.
Implementation
// See <https://stackoverflow.com/a/66249380/>.
bool isNullable<T>() => null is T;
Returns true if T is a nullable type.
// See <https://stackoverflow.com/a/66249380/>.
bool isNullable<T>() => null is T;