Fixed #2210: replaces typeof with cc.isXXXX

Replaces typeof with cc.isXXXX