use illegalargumentex instead, invalidargumentex is the wrong one