Returns true if the value at the given index is a userdata (either full or light), and false otherwise.
true
false
Lua Docs.
bool isUserData(int index) => lua.lua.lua_isuserdata(pointer, index) == 1;