I’m pretty sure FindObjectOfType returns null if it can’t find an object, so the simplest way to do it would be:
if (v) // if not null
return v;
else
return null;
Thinking about it, this is exaclty the same as just doing return v; … You could check the value upon return from the method to make sure the object you’re trying to use is not null, e.g:
Vehicle v = yourScript.GetVehicleInScene();
if (v)
// If not null, do stuff