You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: check.go
    path of file: ./repos/goutil/internal/checkfn
    
    the code of the file until where you have to start completion: package checkfn

import (
	"bytes"
	"fmt"
	"reflect"
	"strings"
)

// IsNil value check
func IsNil(v any
    
func IsNil(v any) bool {
	if v == nil {
		return true
	}

	rv := reflect.ValueOf(v)
	switch rv.Kind() {
	case reflect.Chan, reflect.Func, reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice:
		return rv.IsNil()
	default:
		return false
	}
}