code: func (l *State) IsUserData(index int) bool {
  	_, ok := l.indexToValue(index).(*userData)
  	return ok
  }
docs: // IsUserData verifies that the value at index is a userdata.
  //
  // http://www.lua.org/manual/5.2/manual.html#lua_isuserdata