Fixed null query for AJAX search