check if id exist in case of a put