Added trim and content check before addings/updates