Sanity checking array indices may be a good idea