Fixed NullPointer bug in StoreDataTask & formatted the code