Hi there,
Some quick points that you can have a look at:
-Check that your connection to the API is correct, before parsing the object, via logging the response.
-Check that your parsed object is correct (AKA, not null). Via logging the object.toString(). print(tank.toString()) in your case before returning the value.
-Check-in your Main that the value returned is not null
-----------------------------------------------------------------------------------------------------------------------------
--If the reply is helpful, please Upvote and Accept it as an answer–