code: func CheckString(l *State, index int) string {
  	if s, ok := l.ToString(index); ok {
  		return s
  	}
  	tagError(l, index, TypeString)
  	panic("unreachable")
  }
docs: // CheckString checks whether the function argument at index is a string and returns this string.
  //
  // This function uses ToString to get its result, so all conversions and caveats of that function apply here.