cast to array if not array