Cleanup the code around checking for an Object field possibly holding an
array.