Überprüfen Sie, ob das Element angezeigt wird

if ($('#element').length) {
	//Check if element exists
}
Armandres