Prevents "Cannot read property 'cmd' of undefined"

This is what I am using to prevent the crash when requests[0] is undefined, it of course does not fix the underlying issue but will at least prevent the process from exiting.