Add diagnostics for tostring return type checking
Document the values for has_tostring