ensure that the existing object in the folder tree is of the right type