Added check for isFinishing() on the parent activity
to prevent crashes when trying to display dialogs when activity
is in this phase of it's lifecycle