It's generally good practice to first create everything that can fail and then create the final instance at once with the results versus doing it piecemeal. Piecemeal creation is typically more error prone and, while not a huge concern here, it also ends up needlessly creating objects that are just thrown away in the event of a later error.