check in a few places to make sure we have an array before looping, to prevent warnings