Redmine #4751: Fix crash in 07_packages/907.cf test case.

The package_name_convention can be unset, so we need to check for null
pointer.