Fantastic!
Make sure you check if tasks.length is greater than 0: tasks.length > 0.
tasks.length
0
tasks.length > 0