Storing an instance of a object inside the shared preferences and retrieve it