Update index.js

The check function now return false or URI if it valid.