Pandas coerces string and unicode dtypes to object dtypes, so I need to be able to test them separately.  There is a wrapper below for the more general case when they are the same.