Prevent PHP warnings

The recent addition of the filter makes it possible for some values in $object to not exist; leading to PHP warnings. This change prevents these.