Make sure "version" exists before looking for pkg key
Make sure "version" exists before looking for pkg key

Fixes the test failure happening on the SUSE Leap build in the nitrogen
branch.

Version can be an empty dictionary and pass the check, but then we hit
a key error on the next line. Let's avoid that.

This failure was caused by the changes in #41086.

Fixes https://github.com/saltstack/salt-jenkins/issues/332

saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt