remove null and empties from the array