It happens in both an existing project and an entirely empty one.
You should be able to reproduce by using the same graph as in my first screenshot in a clean new project.
In my existing project my array length is not null when it gives that error, but exactly one. However the calculation required when this array is bigger than X (X > 10, in my case) involves a division by (length - 1) - and thus the error.