If you need to check whether you are in admin area or in customer one, use the following method:
It is particularly useful, if you need to perform this check in a model class or any other zone-independent one. The method is defined in
\XLite class and it will return
admin.php script was called, or
cart.php one was.