Fix when using key_dir config

When key_dir setting is used in gpg hiera section, an exception is thrown because what is supposed to be a string is an array instead. Type check added