code: func (l *State) IsGoFunction(index int) bool {
  	if _, ok := l.indexToValue(index).(*goFunction); ok {
  		return true
  	}
  	_, ok := l.indexToValue(index).(*goClosure)
  	return ok
  }
docs: // IsGoFunction verifies that the value at index is a Go function.
  //
  // http://www.lua.org/manual/5.2/manual.html#lua_iscfunction