fix exception when trying save None to history