code: func (l *State) ToUserData(index int) interface{} {
  	if d, ok := l.indexToValue(index).(*userData); ok {
  		return d.data
  	}
  	return nil
  }
docs: // ToUserData returns an interface{} of the userdata of the value at index.
  // Otherwise, it returns nil.
  //
  // http://www.lua.org/manual/5.2/manual.html#lua_touserdata