Use localstorage location only if it is valid