Adding guard for non-Array initial state, and renaming state argument to initialState