Trying some basic type checking inside Lua; part of #102.