You can change your declaration like this:
Someclass someObject = null;
Or you can do everything into the try-catch to be sure that someObject
will be initialized properly
try {
Someclass someObject = someOperation();
int number = Integer.valueOf(someObject.someMethod());
} catch (Exception e) {
//...
}