Checks if param for foreach is array