added isset to fix error message during migration