Fix error: void variable check-fn

Hi Nguyễn,

This PR fix an error when evaluating:

    (wand:add-rule (wand:create-rule....))

Cheers,
syl20bnr