Java tutorial
//package com.java2s; import android.text.TextUtils; public class Main { private static final String EMPTY_STR = ""; public static String safeString(String string) { if (TextUtils.isEmpty(string)) { return EMPTY_STR; } else { return string; } } }