* js: return null if str converted with invalid date