Catch only NoSuchElementException here.