oncollisionenter2d always collides

i have a scene 2D with a wall, a player, ground and a zombie. They all have collisions. I want the zombie to climb over the wall. The bit where it detects if it is a wall, for some reason, always gets triggered. Here is the code: using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class zombieAI : MonoBehaviour {

public Rigidbody2D rb;
public GameObject arm;
public Transform target;
public string state;
public int speed;

// Use this for initialization
void Start () {
    state = "walk";
}

// Update is called once per frame
void Update () {

    if (state == "walk")
    {
        rb.AddForce(new Vector2(0, speed));
    }

}

private void OnCollisionEnter2D(Collision2D collision)
{
    if (collision.gameObject.name == "wall")
    {
        rb.AddForce(new Vector2(300, 0));
    }
}

}

Are you sure that is not touching an object called “wall”?
There is no other reason for it to trigger otherwise.
Also, your check by name is not really ok, because you’ll have to be sure that all the wall obstacles are called wall. It will be better if you create a tag named wall, assign it to all your wall obstacles and change the check with collision.CompareTag(“wall”).

dude the problem is your code. when zombie is walking he goes up and never come back !!!

            if (state == "walk")
 {
     rb.AddForce(new Vector2(0, speed));
 }

you should change it to

         rb.AddForce(new Vector2(speed, 0));

and if you want the zombie to climb the wall you should the last part of your code to it

   private void OnCollisionEnter2D(Collision2D collision)
    {
        if (collision.gameObject.name == "wall")
        {
            rb.AddForce(new Vector2(0, 300));
        }
    }