public static <T> T orElseIfNull(T target, T elseTarget) {
        return Optional.ofNullable(target).orElse(elseTarget);
    }
public static < T > T orElseIfNull ( T target , T elseTarget ) { return Optional . ofNullable ( target ) . orElse ( elseTarget ) ; }
Or else if null t.

@param <T>        the type parameter
@param target     the target
@param elseTarget the else target
@return the t