Added a check to prevent a NullPointerException when console uses the
balances command.