You could do something like this by checking on the id of the item that is in the cart.
If student memberships have one id versus another that is used for professional then you could do a custom check to see if it is the student membership that has been added to the cart by checking for the id like this:
if($eCart1->InCart("123")){
//do something
}
or you can check if it is not in the cart like this:
if(!($eCart1->InCart("123"))){
//do something else
}