if (value == null) {
TypeHandler typeHandler = mapping.getTypeHandler();
if (typeHandler != null) {
String nullValue = mapping.getNullValue();
if (nullValue != null)
value = typeHandler.valueOf(nullValue);
return value;
} else {
throw new SqlMapException("No type handler could be found to map the property '"
+ mapping.getPropertyName() + "' to the column '" + mapping.getColumnName()
+ "'. One or both of the types, or the combination of types is not supported.");