Handle null and show the index
Stop index out of bounds exceptions