Use input->is_ajax_request()

Just some DRY.