Improved object id validator