Print error if index value in a page is wrong type

This was causing a panic with no information displayed about the
page causing the error.
Merge pull request #53 from hugoduncan/feature/print-error-on-invalid-index

Print error if index value in a page is wrong type