The error clearly tells you what the issue is. It was expecting a number and it got nil. From that you can conclude that either (or both) of v.x and v.y is nil.
BUT, the error even goes further to tell you that argument 2 is the nil one. If you do a count from one to two, you'd see that v.x is the second argument.
Actually reading the error message might help in the future...