check if data-main exists (prevent js error on login page)