Avoiding NullPointerException in Java | Hacker News Reader