Add urn validation, see #358

Have a look and :+1: if ok @jschnasse .