Extract index_in? method