exists js function - equivalent to rails obj.present