simpler: `if (isBidirectionalRange!Range && is(typeof(range.front == element) : bool))`