Q:

MySQL Convert a SUM of 0 rows to an integer 0

On my MySQL trip, MySQL challenges me more and more. Let's say I have TableA and TableB with following structure (it is simplified to point out the problem):
TableA
+------------------+
| IDA| Description |
|----|-------------|
| 1  | Something   |
| 2  | Else        |
| 3  | IDK         |
+------------------+

TableB
+------------------+
| IDA   | Amount   |
|------------------|
| 1     | 5        |
| 2     | 7        |
| 2     | 17       |
| 1     | 15       |
+------------------+

My goal is now, that I sum up the amount for every id. Therefore I use following code
SELECT (SELECT SUM(amount) FROM TableB WHERE IDA = a.IDA) as Total, Description FROM TableA a

This code works as long I have a row in my TableB. In this example, I get for IDA 3 a Total of NULL. In my more complex code, I am going to calculate with this code so the whole field returns NULL. 

Am I able to replace the NULL with 0 or convert it? 
Is it possible to make if else clause there?

A:

SELECT (SELECT SUM(IFNULL(amount,0)) FROM TableB WHERE IDA = a.IDA) as Total, Description FROM TableA a

The part IFNULL(amount,0) means when amount is not null return amount else return 0.

