Check return value for _decode before using

Fixes #74