Update val.js

Using style guide to update my pull, add a comment as to why I'm using try/catch.