Validate object type and id