Use isFunction in store and createStore