Removed checking for PY2 for converting to string.