I forgot to check for visited nodes on checkNullability2. Which is wrong. It could go into infinite loops. I will fix it.