If the field being mapped is nullable, you should use 
```java
String res = getString(<fieldname>);
if (res != null) {
    return Long.parseLong(res);
}
```
i.e. If the type is a Long, your mapper returns a 0 when we expect a null.