Check that the last_updated value is not None before trying to encode it