Add support for as_null_object with spies