fixed null pointer exceptions when no data is available for graphs