Added check for nil object during row deletion in master controller.