Dash Upload data Update graph with callback - Cannot read property 'data' of null

I managed to figure out the cause of error message which is due to not properly defining the else condition in update_graph function. Thanks for the information from this thread Initializing empty graph

Glad I found this forum!