Support new Encode.pm
Suppress warnings by encoding undef value