Ejemplo

public static void main( String[] args ) {
Object object;
//....
if (object.getResult() != null) {
System.out.println(object.getResult());
}
}

Solución
    Utilice una variable para almacenar el resultado de la invocación del método

public static void main( String[] args ) {
Object object;
Object result = object.getResult();
if (result != null) {
System.out.println(result);
}
}