I beg to differ with Adv Goyal. A legally enforceable debt arises from a legally enforceable agreement/contract. A legally enforceable agreement/contract can also be orally made. So, we cannot rule out first hand that there was no legally enforceable debt just because the contract/agreement was not reduced to writing.
Practically, since sec 139 presumes in favour of holder, "A" will have to prove to the court that there was no legal liability against which the chq was issued. This is a matter of trial on which Adv Goyal is infinitely more qualified than me to comment.