String s = "string"; String.valueOf(s).toString(); // just to make sure it's a damn string while(!s instanceof String) { String.valueOf(s).toString(); }