This is not the preferred way to check for an "unset" property. If level_property is NULL, then it is unset. And once a property has been set, it can be set NULL to make it unset. Is using NULL for unset a problem for how you use this filter?