Eliminate potential NPEs in the JavaProcess inner class.