Handle arrays with missing indexes more gracefully

Instead of throwing an exception, return nil