Catch NPEs in CustomNBT methods.