This must have been added in previous pr to correct possible errors during tree import. I guess I'll undo this change and add extra checks to tree importer instead.