Change type of thrown exception to ArgumentOutOfRange