decode null properly