Added support for non-null fields and fixed a bug where returned 0 ints were sometimes getting set to null.