Check date is valid moment/moment#1639 moment(undefined).isValid() return true? moment(someString || null).isValid()