npe protection around db backup