check to make sure theState exists when processing styles (ALOY-624)