Fix Python3 incompatible string checks.
Fix Python3 incompatible string checks.

Summary: This correctly uses basestring for Python2 and str for Python3

Reviewed By: philipjameson

fbshipit-source-id: affd900139

SeleniumHQ/buck,rmaz/buck,brettwooldridge/buck,facebook/buck,romanoid/buck,brettwooldridge/buck,rmaz/buck,rmaz/buck,brettwooldridge/buck,romanoid/buck,Addepar/buck,romanoid/buck,Addepar/buck,SeleniumHQ/buck,Addepar/buck,brettwooldridge/buck,Addepar/buck,kageiit/buck,romanoid/buck,nguyentruongtho/buck,JoelMarcey/buck,Addepar/buck,romanoid/buck,kageiit/buck,facebook/buck,zpao/buck,zpao/buck,zpao/buck,kageiit/buck,JoelMarcey/buck,Addepar/buck,SeleniumHQ/buck,romanoid/buck,zpao/buck,romanoid/buck,brettwooldridge/buck,nguyentruongtho/buck,SeleniumHQ/buck,rmaz/buck,nguyentruongtho/buck,nguyentruongtho/buck,facebook/buck,Addepar/buck,brettwooldridge/buck,brettwooldridge/buck,SeleniumHQ/buck,nguyentruongtho/buck,facebook/buck,romanoid/buck,SeleniumHQ/buck,JoelMarcey/buck,romanoid/buck,SeleniumHQ/buck,brettwooldridge/buck,rmaz/buck,JoelMarcey/buck,romanoid/buck,brettwooldridge/buck,zpao/buck,rmaz/buck,Addepar/buck,brettwooldridge/buck,rmaz/buck,JoelMarcey/buck,SeleniumHQ/buck,nguyentruongtho/buck,romanoid/buck,SeleniumHQ/buck,kageiit/buck,rmaz/buck,nguyentruongtho/buck,rmaz/buck,romanoid/buck,JoelMarcey/buck,facebook/buck,Addepar/buck,romanoid/buck,zpao/buck,SeleniumHQ/buck,kageiit/buck,SeleniumHQ/buck,JoelMarcey/buck,JoelMarcey/buck,kageiit/buck,zpao/buck,Addepar/buck,SeleniumHQ/buck,JoelMarcey/buck,rmaz/buck,brettwooldridge/buck,Addepar/buck,brettwooldridge/buck,JoelMarcey/buck,SeleniumHQ/buck,brettwooldridge/buck,JoelMarcey/buck,facebook/buck,facebook/buck,rmaz/buck,JoelMarcey/buck,rmaz/buck,JoelMarcey/buck,rmaz/buck,kageiit/buck,Addepar/buck,Addepar/buck