Yes that is possible. To check the name value you would have to loop through the cart, but if you did it by item ID you could use the $cartName->InCart(ID) method that would return true or false depending on if that item id was in the cart or not.
Total price you could get by using $cartName->TotalColumn("TotalPrice")
So putting it together it might look like:
if ($cartName->InCart(3) && $cartName->TotalColumn("TotalPrice") == 50)
Item id 3 is in the cart and the total is $50