73X - fix `HadronAndPartonSelector` for unknown generators

Forward port of #6485 :
A possibly invalid handle in the `HadronAndPartonSelector` is not dereferenced any more, before its validity has been checked.