Quick fix to check for env vars support

-added quick check for present environment variables before attempting to operate on them
-this was breaking my local hubot because I don't have the staging management system configured
-unfamiliar with this piece of code, let me know if I'm doing it right