convert nil to float when calculate balance total