Checking when an object is on the ground

I am trying to check when my object (a sphere) is on the ground using Physics.CheckSphere. No matter where I place the sphere in relation to other objects in the scene, OnGround is always true. Why is this and how I can I fix it? Thanks.

var OnGround: boolean;	

function FixedUpdate (){
	if (Physics.CheckSphere(transform.position, 1))
		OnGround = true;
	else
		OnGround = false;
}

var OnGround: boolean;

function OnCollisionEnter(collision : Collision) {
    if (collision.transform.tag.Equals("floor"))
       OnGround = true;
}

function OnCollisionExit(collisionInfo : Collision) {
    if (collisionInfo .transform.tag.Equals("floor"))
       OnGround = false;
}

i used this a lot and it works you only have to set the tag of the floor to “floor” or everything you want