add checks for hasOwnProperty and used forEach where useful
Merge pull request #1 from Asana/has-own-property-checks

add checks for hasOwnProperty and used forEach where useful