Fix issue when JS is fired without element

If someone call $.nette.ajax( url ), datagrid will throw exception and abort request, this patch will prevent that...