private $db = null;

in connect
if(!is_a($this->db)
{
throw new PDOException('ERROR ');
}
Ancora meglio usa instanceof