Check package_versions attributes to avoid exceptions being thrown

Issue DE112