Prevent user from sending string instead of int via the API

I had the case where I sent a string instead of an integer to the API and the prev and next button wouldn't work anymore.