simplify some code and remove a frequent, unnecessary null pointer check in the generated javascript
Merge pull request #2509 from waywardmonkeys/embind-improvement

simplify some code and remove a frequent, unnecessary null pointer check...