public static boolean isEqualOrNull ( Map s1 , Map s2 ) { if ( s1 == null && s2 == null ) { return true ; } else if ( s1 != null && s2 != null && s1 . size ( ) == s2 . size ( ) ) { return true ; } return false ; }
Check whether two Map are same size or both null .