Fix error if falsy error thrown in callback handler

fixes #960