added throws NullPointerException in the javadocs