Check undefined clients in js after ajaxcall