Proper conversion of existing id to string while checking for oid assignment