checking if a variable is an array before doing array_reverse.