How to create 2D random movement?

So far I have code which translates my game object in random position, but it does not detect when it’s collided with box collider 2D. i don’t know why?
In my scene I have maze with attached box colliders 2d with unchecked isTrigger and use by effector.

using UnityEngine;
using System.Collections;

public class randomMovement : MonoBehaviour {
	public int ranNum;
	public GameObject blinky;
	public float speed = 0.3f;
	// Use this for initialization
	void Start () {
		ranNum = 1;
	}
	
	// Update is called once per frame
	void FixedUpdate () {
		ranNum = Random.Range (1, 5);
		switch (ranNum) {
		case 1:
			blinky.transform.Translate(Vector2.up*speed);
			break;
		case 2:
			blinky.transform.Translate(-Vector2.up*speed);
			break;
		case 3:
			blinky.transform.Translate(Vector2.right*speed);
			break;
		case 4:
			blinky.transform.Translate(-Vector2.right*speed);
			break;

		}

	}

	void OnCollisionEnter2D(Collision2D col){
		Debug.Log ("Collided!");
		if (col.gameObject.name == "maze")
			ranNum = Random.Range (1, 5);
	}
	}

You’re probably using a wrong combination of static colliders/rigidbodies/events.
Please check the table at the bottom of this article to see if your setup is valid.
If your setup is valid you could check the collision matrix in the physics manager.