private static boolean equalsMayBeNull(Object obj1,Object obj2){
  return (obj2 == obj1) || ((null != obj1) && (null != obj2) && obj2.equals(obj1));
}

private static boolean equalsMayBeNull ( Object obj1 , Object obj2 ) { return ( obj2 == obj1 ) || ( ( null != obj1 ) && ( null != obj2 ) && obj2 . equals ( obj1 ) ) ; }
tell if two objects are equal , when either one may be null . if both are null , they are considered equal .
