Fixed an issue which had DocumentPackage.toAPIPackage() throwning NullPointerExceptions if the attributes were not set.