public static Object excludeNullProperties(Object o) {
        try {
            
            PropertyDescriptor[] properties = java.beans.Introspector.getBeanInfo(o.getClass())
                    .getPropertyDescriptors();
            for (PropertyDescriptor field : properties) {
                String fieldName = field.getName();
                
                Object value = getFieldValueByName(o, fieldName);
                if(value != null) {
                    String str = value + "";
                    if(str.equals("") || str.equals("null")) {
                        setFieldValueByName(o,fieldName, null);
                    }
                }
            }
        } catch (Exception e) {
            logger.error(e.getMessage(), e);
        }
        return o;       
    }