Hi,
Idea of setup() is to load stuff and make other time consuming preparations. And have the actual functionality in draw(), after all that loading and preparations are done.
Processing does not promise that all the stuff is loaded while inside setup() code, but draw will not start before setup is finished and all loading is done.
My guess is that processing has not loaded all the images and you continue to use them anyways causing NullPointerException.