I always thought I could just check an undefined var by comparing it to undefined, but this is the error I get in the chrome console :
You can use : if( typeof jQuery !== 'undefined')
or
Do what is recommended by mozilla
if('jQuery' in window)
https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/undefined