fixed localstorage getitem return value check