Example

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

Solution
    Use a variable to store the result of the method invocation

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