Various improvement, add validator for ObjectOrId.