add error massage if jQuery element is undefined