Convert the $expire argument to a valid value. Handle cases were $data is an object, or neither an object or array.