Added a check to ensure that a job is not deleted if it is associated with any shifts