Only wrap `next()` when it's defined