Java tutorial
//package com.java2s; public class Main { /** * * @param checkNull * @return empty string if the value is null */ public static String checkForNull(String checkNull) { if (checkNull != null && !checkNull.equalsIgnoreCase("null")) return checkNull; else return ""; } }