public static void checkValueIsNull(Object value,Object name){
  if (value != null) {
    throw new RuntimeException("'" + name + "' elements do not accept a value argument.");
  }
}

public static void checkValueIsNull ( Object value , Object name ) { if ( value != null ) { throw new RuntimeException ( "'" + name + "' elements do not accept a value argument." ) ; } }
throws an exception if value is null .
