Save and load any object to SharedPreferences