Fixed a minor bug checking for null values when restoring poses.