on the result call the method encode with the arguments encoding and errors, return the result. if strings_only and boolean return value of the call to the function is_protected_type for argument s are boolean True,
if strings_only and is_protected_type ( s ) :