Prevent JS error on pages without lists