Simplify UrlCode check code.