add README
diff --git a/README.md b/README.md
index 307a43a..4cc7382 100644
--- a/README.md
+++ b/README.md
@@ -15,4 +15,38 @@
 
 [json-iterator](https://github.com/json-iterator/go) use this package to save runtime dispatching cost.
 This package is designed for low level libraries to optimize reflection performance.
-General application should still use reflect standard library.
\ No newline at end of file
+General application should still use reflect standard library.
+
+# reflect2.TypeByName
+
+```go
+// given package is github.com/your/awesome-package
+type MyStruct struct {
+	// ...
+}
+
+// will return the type
+reflect2.TypeByName("awesome-package.MyStruct")
+// however, if the type has not been used
+// it will be eliminated by compiler, so we can not get it in runtime
+```
+
+# reflect2 get/set interface{}
+
+```go
+valType := reflect2.TypeOf(1)
+i := 1
+j := 10
+valType.Set(&i, &j)
+// i will be 10
+```
+
+# reflect2 get/set unsafe.Pointer
+
+```go
+valType := reflect2.TypeOf(1)
+i := 1
+j := 10
+valType.UnsafeSet(unsfae.Pointer(&i), unsafe.Pointer(&j))
+// i will be 10
+```
\ No newline at end of file
diff --git a/reflect2.go b/reflect2.go
index 25890b6..ac13ad6 100644
--- a/reflect2.go
+++ b/reflect2.go
@@ -213,6 +213,9 @@
 }
 
 func Type2(type1 reflect.Type) Type {
+	if type1 == nil {
+		return nil
+	}
 	return ConfigUnsafe.Type2(type1)
 }
 
diff --git a/type_map_test.go b/type_map_test.go
new file mode 100644
index 0000000..5424b46
--- /dev/null
+++ b/type_map_test.go
@@ -0,0 +1,17 @@
+package reflect2_test
+
+import (
+	"github.com/modern-go/reflect2"
+	"testing"
+)
+
+type MyStruct struct {
+}
+
+func TestTypeByName(t *testing.T) {
+	typByPtr := reflect2.TypeOfPtr((*MyStruct)(nil)).Elem()
+	typByName := reflect2.TypeByName("reflect2_test.MyStruct")
+	if typByName != typByPtr {
+		t.Fail()
+	}
+}