fix getState() returned type

when cookie is not existing, return undefined.
https://github.com/carhartl/jquery-cookie#usage

thanks.