it's better to not set the attribute if it is empty