Change maxSpeed

When I change the maxSpeed on AIPath it returns a null reference error. like this

ai.maxSpeed = 20f;

what am i doing wrong guys?

sorry its my error guys ignore this plz.