Properties of state should not be called if state is undefined. Causes JS error in certain situations.