correctly handle cases where a dependency does not have a `version` property because it is either missing or invalid