write test for an array with nil and write code to pass