Issue #118 (supplemental) Fix logic error on a null encoding