Avoid using chai if not defined