MoveTo() to a destination of arbitrary Z axis value

Let’s say I have two vectors FVector FirstDestination(0.f, 0.f, 1000.f), FVector SecondDestination(0.f, 0.f, -1000.f), and a nav mesh that is basically a plane that doesn’t have a point higher than 0.f on Z axis. When I use MoveTo() or TestPathSync() with the the destinations above does the engine use Raytrace on navmesh to get a point that shares specified XY coordiantes but different Z? Should I always specify a point that is definitely on navmesh or it is good enough to make Z somewhat arbitrary?