Fix empty checks to not crap out if you add properties/functions to arrays
Merge pull request #50 from kleinsch/fix-error-handling

Fix empty checks to not crap out if you add properties/functions to arrays