Handle values outside specified index gracefully