Change Linq query to pull an item out that isn't used to instead check if the index is out of range of the array