Avoid null result from localStorage being used