Prevent inputing an out of bounds item.