How to Check for Undefined in JavaScript | CodeTrail