Update DateSerializer.java

Fix NPE when saving a model with a null date.