added some error-checks and error-codes when packing text-instances.