support nil charset

noticed nil failing when dropping the 772 fix into our mail parser project

@bf4