Helper function to deal with the Pyramid of Doom wrt Swift Optionals.