code: private String getString(String key, String defaultValue, boolean required) {
          String value = map.get(key);
          if (value == null || value.length() == 0) {
              if (required) {
                  throw new NullPointerException("Property value for key '" + key + "' is required");
              } else {
                  return defaultValue == null ? value : defaultValue;
              }
          } else {
              return value;
          }
      }
docs: /* Helper methods