Correctly handling storing of None values