package anynil

import 

// Is returns true if value is any type of nil. e.g. nil or []byte(nil).
func ( any) bool {
	if  == nil {
		return true
	}

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

// Normalize converts typed nils (e.g. []byte(nil)) into untyped nil. Other values are returned unmodified.
func ( any) any {
	if Is() {
		return nil
	}
	return 
}

// NormalizeSlice converts all typed nils (e.g. []byte(nil)) in s into untyped nils. Other values are unmodified. s is
// mutated in place.
func ( []any) {
	for  := range  {
		if Is([]) {
			[] = nil
		}
	}
}