CON-1580 check if index in array