Adds check for damaged/broken nbt

should fix #428
Merge pull request #429 from hilburn/master

Adds check for damaged/broken nbt