code: static String valueAsString(Map<String, Object> map, Key key, String defaultValue) {
          Validate.notNullOrEmpty(key.key, "Key for plugin configuration must be set");
          if (map.containsKey(key.key)) {
              return map.get(key.key).toString().length() == 0 ? defaultValue : map.get(key.key).toString();
          }
          return defaultValue;
      }
docs: Fetches a value specified by key
  
  @param map XPP3 map equivalent
  @param key navigation key
  @param defaultValue Default value if no such key exists
  @return String representation of the value