Here you can find the source of isEmptyOrNull(String string)
public static boolean isEmptyOrNull(String string)
//package com.java2s; public class Main { public static boolean isEmptyOrNull(String string) { if (string == null) { return true; }//from ww w . ja va 2s. c om if (string.trim().length() == 0) { return true; } return false; } }