#NEWLINE# def _validate_maybe_string( name , item ) : #NEWLINE# #INDENT# if ( item and ( not isinstance ( item , six . string_types ) ) ) : #NEWLINE# #INDENT# raise ValueError ( '{} was expected to be of type {} but given {}' . format ( name , type ( item ) , item ) ) #NEWLINE# #UNINDENT# return item