Determine if player is on a object

So I am trying to create a extra boost jumper for my player. So I want it to detect if the player is on a cube and if so for it to jump.

How would I manage to write the code for checking if the player is on the object?

void OnCollisionEnter(Collision other){

     if(other.gameObject.name=="Cube"){
//Then Do Stuff
}

}

or you can use compare tag (if the cude has a tag )

if(other.transform.CompareTag("Cube"))