Decimal.isNaN

bool isNaN() const @safe pure nothrow @nogc

True for NaN of either kind.