diff --git a/lib/field.js b/lib/field.js
index <HASH>..<HASH> 100644
--- a/lib/field.js
+++ b/lib/field.js
@@ -55,12 +55,14 @@ _.extend(Field.prototype, {
 
 		depth || (depth = 0)
 
+		if (value === null)
+			return null
+
 		var dataType = this.getDataType()
 
 		if (
 			depth <= 2 &&
 			(
-				value !== null &&
 				typeof value == 'object' &&
 				value.toString() == '[object Object]'
 			) ||
@@ -74,8 +76,15 @@ _.extend(Field.prototype, {
 		{
 			value = this.castToDataType(value)
 
-			if (dataType == 'decimal')
-				value = value.toString()
+			switch (dataType)
+			{
+				case 'decimal':
+					return value.toString()
+
+				case 'integer':
+					if (isNaN(value))
+						return null
+			}
 		}
 
 		return value
Don't cast null values in where option, if where value of an 'integer' field is NaN then change it to null.