Check for existence of localStorage object before trying to index it.

The javascript interpreter in the Android Pebble app was silently failing if there was no "options" object in localStorage. This patch just checks if anything was read before attempting to index a null object.