Don't cast null values in where option, if where value of an 'integer' field is NaN then change it to null.