Null pointer exception handling localData data.