Unfortunately there is no 'get is walkable' method to determine whether the position occurs within geometry.
Further more it assumes that the land is flat and always at an elevation of 0.0 on the z axes.
On a mountain tile-set, this is unlikely to be the case.
The only way to solve this, is to spawn a creature at the 'proposed' location, then get the creatures location, and then destroy the creature.
Done correctly, you can spawn, get the creatures location, and destroy it - so fast that the players never see the creature in the first place.
You can also make the creature have an invisible model just to be sure.
The reason you do this, is because creature spawning will automatically default to the nearest walkable location nearest to the provided spawning location.
This will provide you
1. A position that is walkable
2. A correct Z elevation for the X and Y coordinate.
The only concerns I would mention, is that Spawning and Destroying of objects are computationally expensive.
I wouldn't recommend calling it rapidly.
location GetRealLocation(location l)
{
object o = CreateObject() // Your create creature step: choose a resref of the creature and provide l as the location.
location lActual = GetLocation(o);
DestroyObject(0.25,o); //Destroy the object
return lActual;
}