add some type check and error exports
Merge pull request #1 from yorkie/patch-1

add some type check and error exports
refactor
Merge pull request #1 from visionmedia/master

merge back!