added the empty check before performing segue to calculate expenses.