refactor get_readonly_item_objects_with_metrics and check for valid tiids