Merge pull request #29 from Zolmeister/master

added undefined check to typecast
added to types.js
Merge pull request #31 from wanderer/master

added array to types.js