check canonical id instead of relying on passed id

BUGFIX: Potentially  causes fake duplicate checks if request_id passed in is not the same type as the one returned by the DB (int vs string).