Check for empty to prevent a notice about an undefined index.