how to check if a drag is valid only when it hits certain object otherwise return objects to original position in unity>

I want to make a simple drag and drop system in 2d unity.
When user drags the object to a position I want to check if the position is valid. As in I want the user to drag a object on another object of specific tag of my choice ,if its anything other then that it returns to its original position.

// The plane the object is currently being dragged on
Plane dragPlane;

// The difference between where the mouse is on the drag plane and 
// where the origin of the object is on the drag plane
Vector3 offset;

Camera myMainCamera;

Vector3 originalPos;

  void Start()

 {
    myMainCamera = Camera.main;
    Physics2D.queriesStartInColliders = false;
    originalPos = gameObject.transform.position;
 }

void OnMouseDown()
{
    collideCheck = false;
    dragPlane = new Plane(myMainCamera.transform.forward, transform.position);
    Ray camRay = myMainCamera.ScreenPointToRay(Input.mousePosition);
   
    float planeDist;
    dragPlane.Raycast(camRay, out planeDist);
    offset = transform.position - camRay.GetPoint(planeDist);
}

void OnMouseDrag()
{

    Ray camRay = myMainCamera.ScreenPointToRay(Input.mousePosition);

    float planeDist;
    dragPlane.Raycast(camRay, out planeDist);
    transform.position = camRay.GetPoint(planeDist) + offset;
}


private void OnMouseUp()
{


    //check if there is something at that position
    Collider2D hitColliders = Physics2D.OverlapCircle(transform.position, 1);
    Debug.Log(hitColliders.tag);


}

private void OnDrawGizmosSelected()
{
    Gizmos.color = Color.red;
    //Use the same vars you use to draw your Overlap SPhere to draw your Wire Sphere.
    Gizmos.DrawWireSphere(transform.position, 1);
}