@Nullable
  private static String getString(Map<String, ?> map, String key) {
    Object o = map.get(key);
    return o instanceof String ? (String)o : null;
  }
@Nullable
  private static String getString(Map<String, ?> map, String key)