How would I write an if statement that says: if pos2[targetPos3] doesn't point to a hashset (is not a hashset) ? I tried that but it still gives me a null point exception.
Object[] pos2;
int targetPos3;
targetPos3 = word.charAt(2) - 'a';
if(pos2[targetPos3] != (HashSet<String>) pos2[targetPos3]){
System.out.println("Sorry");
}