Is there a global variable of sorts that can be used as a bool to determine if something is in the basket?
Commerce Cart has the following function
commerce_cart_order_session_exists() which you could probably use to set a boolean value.
Checks to see if any order ID or a specific order ID exists in the session.
To answer your question directly though, there is no global variable to detect carts.