public static <K,V> Set<K> commonKeys(Map<K,V> left, Map<K,V> right) {
        if (left == null || right == null) {
            return Collections.emptySet();
        }

        return Sets.intersection(left.keySet(),right.keySet());
    }
public static < K , V > Set < K > commonKeys ( Map < K , V > left , Map < K , V > right ) { if ( left == null || right == null ) { return Collections . emptySet ( ) ; } return Sets . intersection ( left . keySet ( ) , right . keySet ( ) ) ; }
null args are allowed