from the error you get I assume you used the object as a parameter to a function that expects a string. the question is, why you did that and what you expect that function to with the object. and then before passing it to the function, extract a sensible string value.