I don't understand what this check is about, especially with the weird overwrite behavior in decode(). Please enlighten me.