BHV-6745: add checks for null in Date/TimePicker.js