Fix up route parameter validation

Closes #3169
-Replace javascript methods that are not available on all
 supported browsers with lodash methods.
-Add returns to transitionTo calls in cases where the model
 hook should stop executing immediately.
Merge pull request #3184 from jaswilli/issue-3169

Fix up route parameter validation