Omit adding attributes if they don't contribute anything.