Error thrown

Attempt to assign property "amount" on null