Added test case for missing name field breaking UAA retrieval, also used a conditional block for clearer visibility