The solution of passing null value into mybatis

when null is passed in the front end, we are very confused when it is clearly null,. Why is the if condition judgment invalid in the xml file of mybatis?
< if test= "name! = null and name! =""" >

identity_id = -sharp{idcard,javaType=String,jdbcType=VARCHAR}

< / if >
or spliced sql,
other projects have been judged in this way all the time, but now there is a problem with the new project

Aug.11,2021

The

problem is the string representation of the Object parameter returned by public static String valueOf (Object obj)
.
parameter:
obj-an Object.
returns:
if the parameter is null, the string is equal to "null"; otherwise, the value of obj.toString () is returned
String name = null;

    Object value = null;
    System.err.println(name == String.valueOf(value));         //false
    System.err.println(name == value);                         //true
    //System.err.println(name.equals(value));                  //
   //System.err.println(name.equals( String.valueOf(value)));  //
    System.err.println("null".equals( String.valueOf(value))); //true
    System.err.println("null".equals(value));                  //false
    System.err.println(name == (String)value);                 //true
Menu