fix typo and read property type of undefined
Merge pull request #5 from coderhaoxin/master

fix typo and read property type of undefined