Handling prismic exceptions in a helper function

@ornicar, if you can have a look as we said, that'd be terrific!