check if session variable exists php

PHP
if (isset($_SESSION['errors']))
{
    //Do stuff
}
Source

Also in PHP: