Cli: Repository should validate if object exists before add/remove

fixes #7461