Spawn object to a perticular area

I want to Spawn the object to a particular location but at a condition if the object that is going to spawn does not overlap already present object at that location.In short I want to test for overlapping
I have formed this pseudo code

var prefab Tester//tests for collision overlapping
var SpawnObject

if(Tester not colliding)
   displayPop("Object alredy present Please move the object");
   disable GUI Spawn Button until object not moved from the location

Use a SphereCast, set the radius to encompass the size of this object you are spawning. Set a random start point, and a random direction with the distance set to be within the spawning area.
2 Scenarios to consider:

  1. If your SphereCast doesn’t hit anything, then you are clear and just spawn where the SphereCast started.
  2. If your SphereCast hits, check if the distance it hit from the starting point is less than radius * 2f, if it is then spawn somewhere between. IF not, pick another random point, and random direction and repeat the process.