Type detect: check for basestring instead of (str, unicode)
Merge branch '_type_detect'