I can confirm that if you have a 'bond' for your type rating costs, then if made redundant you are free from any commitment. This happened to me post 9/11.
If you are on the new generation of 'loan', then as pointed out if it is an agreement between you and a bank, then you will still be liable for any outstanding debt.
PP