Avoid a nil index crash
Merge pull request #8 from khonkhortisan/master

check whether an object is really a luaentity before trying to get its name