Add check exist for ajax