A Lua error is now triggerd in case of wrong param type

Before an exception was triggered instead