Do you mean the background is chosen from among the different images for different types of worlds? and the actor stays in the one type world throughout (like) a level?
<< Code Omitted >>
Here's an example of what I meant
You will probably need to maintain the image itself or an int value that represents which image was chosen in a field so that it (the field) can be checked to determine which was used.
The only way you would be able to tell using getBackground is if you checked the color of one or more pixels of the image to narrow down which was chosen (which you really would not want to do).