localstorage: Correctly check whether value is set before setting default

The old condition always overwrote boolean values that were set to false
with the default m( Check for undefined instead.