Perhaps something using a retriggerable monostable multivibrator, but triggered on a low pulse rather than a high one?
That would catch very small low pulses, so that even e.g. 99.9% duty cycle wouldn’t be detected as DC. On the other hand, if it makes sense in your application for almost 100% to count as 100%, you could also consider some kind of filtering to analog, and use a comparator.