Added isDark and isLight checks