Correct me if I'm wrong, but I don't think you need the if / else control flow here. You can just call handlerCallback(err, res).
If there is an error the rest of your code should check for it first and ignore the res (which will be null or empty anyway) and if there's no error it'll be null anyway so you can just pass both variables straight through.