Fixed #2210: replaces typeof with cc.isXXXX
Merge pull request #2212 from dingpinglv/Iss2210_CheckType

Fixed #2210: replaces typeof with cc.isXXXX