detect empty JSON file and prevent refreshing charts in case it is