Updated job.depends() adding checks, tests and a slight behavior change