Undefined index fix

Obviously if we try to pass non-array value, it will result in undefined index notice.