Fix exception on res.end(null) calls

fixes #75