@mkai I'd prefer `isinstance(image, basestring)` here.