Fixed NPE in case of null date (dates can be null if the user hasnt picked a date yet)