Check array is defined to avoid a warning