Optimized get string from object