Cope with empty encoding value [Thanks y3k]