Problem with AsInteger

I'm new to Neo4j, so apologies if this is very basic...

I am loading in my data, which contains 4 columns (Category, User1, User2, Weight) - weight is an integer, as follows:

> LOAD CSV WITH HEADERS FROM 'file:///file.csv' AS row
> WITH toInteger(row.Weight) AS Weight, row.User2 AS User2, row.User1 as User1, row.Category as Category
> MERGE (a:Person {name:User2, category: Category, weight: Weight})
> MERGE (b:Person {name:User1, category: Category, weight: Weight})
> MERGE (a) -[:FOLLOWS {FOLLOWING:Weight}]-> (b);

But when I try to run the following command...

MATCH (a:Person)-[:FOLLOWS]->(b:Person) return id(a) AS source, id(b) AS target, sum(a:Weight) AS weight

... I get the following error:
Type mismatch: expected Float, Integer or Duration but was Boolean (line 1, column 86 (offset: 85)) - this error points to the a:Weight part of the statement

I thought my Weight column was an integer, as I convert it in the Load statement? How can I set weight as an integer correctly?


sum(a:Weight) AS weight


sum(a.Weight) AS weight