set ID only if present, otherwise empty string is used as an id