It already passed an isset check, use ! empty here.
Init the empty array.
If there is nothing in the array, clear the div and return.