Improved checks for idempotency.