Yes; changing the throw... function to a more useful check... function -- well done.