Replacing condition which has 'in' with '!== undefined' condition

Replacing ```dep in pkgs``` with ```pkgs[dep] !== undefined```