Custom Errors in JavaScript and when to use them?