replaced manual error message with lual_checktype
Merge pull request #11 from HennyH/range-use-luaL_checktype

replaced manual error message with lual_checktype