Here you can find the source of isNull(Object s)
public static boolean isNull(Object s)
//package com.java2s; //License from project: Open Source License import java.io.UnsupportedEncodingException; public class Main { public static boolean isNull(Object s) { return isBlank(nullValue(s)); }// ww w .j a v a 2 s .co m public static boolean isBlank(Object s) { return (s == null) || (nullValue(s).trim().length() == 0); } public static String nullValue(String s) { return s == null ? "" : s.trim(); } public static String nullValue(Object s) { return s == null ? "" : s.toString(); } public static String nullValue(long s) { return s < 0L ? "" : String.valueOf(s); } public static String nullValue(int s) { return s < 0 ? "" : "" + s; } public static String trim(String s) { if (s == null) { return ""; } return s.trim(); } public static String toString(byte[] b, int offset, int length, String charset) { try { return new String(b, offset, length, charset); } catch (UnsupportedEncodingException e) { throw new IllegalArgumentException(e); } } }