java.lang.nullpointerexception cannot invoke java.lang.integer.intvalue() because