[fix] Only use typeof checks so we don't get hit by IE8 unknown issues. Should fix #129