Consider throwing a different exception.
Throwing a NoSuchElementException is a bit misleading when an element is found.