Oh right, WikiError, I guess that rules out is_object() then. But WikiError::isError() would work well, that's what it's for after all. In any case I think I'll have to have a close look at any interface that uses WikiError, it's not the nicest programming pattern and can lead to XSS vulnerabilities due to the lack of error formatting. I wrote Status.php partly to address its shortcomings.