Check for nil views before adding them to an array