check previous handler on NULL
Merge pull request #41 from yvasileuski/issue40

Do not call previous handler if it is not set