Why did you handle types here instead of add_index_hint inside?