Fix potential type error

We must take care to apply getters only to structure instances.  In case
of a package name, we have to pass it on to `package-install`.

Thanks, @rejeep