Add some null-checks
First storage code