You could simplify the above 5 lines into the following two:

    if isinstance(cubes, iris.cube.Cube):
        cubes = iris.cube.Cube([cubes])