private <S> S param(@NotNull Key<S> key) {
    Object o = getParameter(key);
    if (o == null && key instanceof KeyWithDefaultValue) return ((KeyWithDefaultValue<S>)key).getDefaultValue();
    @SuppressWarnings("unchecked") S s = (S)o;
    return s;
  }
private <S> S param(@NotNull Key<S> key)