Properly handle objects with no id (i.e. label)
Extract deleteByType method.
1.5.1