CGIV-3821: Ensure that we remove any nil values from the array