public static < T > Set < T > createIfNull ( Set < T > currentValue ) { if ( currentValue == null ) { return new HashSet <> ( ) ; } else { return currentValue ; } }
Returns a new empty set if the passed array is null .