Looks like you're missing the magic __isset()
method.
public function __isset($name)
{
return isset($this->data[$name]);
}
Change according to where you store the data.
From the Manual:
__isset() is triggered by calling isset() or empty() on inaccessible properties.