Fix  type judgment  error.
Merge branch 'v3' of https://github.com/cocos2d/cocos2d-x into v3_hot_fix
Merge pull request #7492 from samuele3hu/v3_hot_fix

Fix a type judgment error.