better object id validation