Prevent inputting an out of bounds item.