added support for calling empty() and isset() on result document properties