If you set the default attribute value to an empty array (instead of nil), you don't need this conditional.