Safer way to check for stringiness that works both in python 2 and python 3.

Thanks to JordiGH for the tip!
Bump up the version number now that we support python 3.