The inject can be replaced with `Enumerable#any?`.