Prevent  exception when summing or counting db columns with no data.