@NonNull
    static String getStringOptionValue(
            @Nullable final Map<String, String> kvs, @NonNull String key,
            @NonNull String defaultValue
    ) {
        final String value;

        final Properties properties = System.getProperties();
        if (properties.containsKey(key)) {
            value = properties.getProperty(key).trim();
        } else {
            if (kvs == null) return defaultValue;

            final boolean containsKey = kvs.containsKey(key);
            if (!containsKey) return defaultValue;

            value = kvs.get(key).trim();
        }

        // if value is blank
        if (value.isEmpty()) return defaultValue;

        return value;
    }
@author Jerry Lee (oldratlee at gmail dot com)
ttl-agent/src/main/java/com/alibaba/ttl3/agent/TtlAgentHelper.java