fixing broken tests

Because the serialiser does not call the constructor tasks is null and trying to iterate over it an exception. Add a simple fix to check if its empty.