Add invariant to check getInitialState return value. Fixes #397