Here you can find the source of isEmptyOrNull(String str)
public static boolean isEmptyOrNull(String str)
//package com.java2s; public class Main { public static boolean isEmptyOrNull(String str) { return str == null || str.length() == 0 || str.contentEquals("null") || str.trim().equals(""); }//from w ww . j av a2s . co m }