This is exactly what I was looking for, how to handle plain objects. Thank you, Andre.
Will definitely be implementing these where possible.
There is the null object pattern for this situation, which returns something that shouldn't break your existing code and only requires minimal changes to your methods which return objects.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.