Add additional check before ajax request.