Wrap trim in empty check for already existing settings