Avoid NPE for test-case if ip is null for MDC.
userName needed for user in UserGroupCache (for MDC in RestUserFilter).