CollectionSync: Fixed keep local changes

The code accidentally ignored CONTENTMIMETYPES isntead of attr->type().
A small refactoring should avoid those errors in the future,
and make the code more readable.