Wall element.curve returns empty

I’m not sure what is the problem, but I can’t return the curve line for a selected wall using element.curve.

what am I doing wrong ?

element.location did the trick

w