Use IllegalArgumentException instead of NoSuchElementException