BUG/MINOR: lua: return bad error messages

The returned type is the type of the top of stack value and
not the type of the checked argument.

[wt: this can be backported to 1.8, 1.7 and 1.6]
1 file changed