fix bug for reading date field from db

"wasNull" has to be called after calling "get" function