Python Error Numpy Ndarray Object Is Possibly Null Error Exception Java