Implement CAS checking in delete cmd.
Added return helper func.
Using return helper func in delete cmd.