support nil charset

noticed nil failing when dropping the 772 fix into our mail parser project

@bf4 
Oh, I see the downcase was blowing up on nil. missed that due to how I read the diff