Check for invalid BDAY in js. Port #194 to master