Add an error handling

You need to set an array to name attribute.