Ensure validity of index in List
Add unit tests