Add undefined check

Signed-off-by: Ryan Chen <ryan.chen@turn.com>
Merge pull request #163 from turn/personal/rchen/fix-jasmine-error

Add undefined check for jasmine tests