Raycast2D Only returns true

I’m bulding a simple 2D platformer but whenever I raycast it only returns true. Even when there is no object as i used Debug.DrawRay and saw the ray was hitting nothing but still the raycast was still returning true even as my player is under all of the Coliders.

using UnityEngine;
using System.Collections;

public class Controls : MonoBehaviour {
	[HideInInspector] public bool FacingRight;
	public float Speed = 6f;
	public float RunSpeed = 12f;
	public float JumpDistance = 1f;
	Animator playerControls;
	Collider2D playerBox;
	Rigidbody2D playerRigidbody;
	Vector2 positonToMove;
	float distToGround;

	void Start () {
		playerControls = GetComponent<Animator> ();
		playerRigidbody = GetComponent<Rigidbody2D> ();
		playerBox = GetComponent<BoxCollider2D> ();
		distToGround = playerBox.bounds.extents.y;
	}

	void Update () {
		float x = Input.GetAxisRaw ("Horizontal");
		Move (x, 0);
		if (Input.GetKey("z")  && IsGrounded() == true ) 
		{
			Jump();
		}
		else if(Input.GetKey("x"))
		{
			Debug.Log(IsGrounded().ToString());
		}
		Animate (x,0);
	}
	void Move(float x, float y)
	{
		positonToMove.Set (x, y);
	 	if (playerControls.GetBool ("IsRunning") == true) {
			Speed = RunSpeed;
		} 
		else {
			Speed = 6f;
		}
		positonToMove = positonToMove.normalized * Speed * Time.deltaTime;
		playerRigidbody.MovePosition ((Vector2)transform.position + positonToMove);
	}
	void Jump()
	{
		playerRigidbody.AddForce(new Vector2(0f, JumpDistance* 5));
	}
	void Animate(float x, float y)
	{
		bool isWalking = x != 0f;
		bool isRunning = x == 1f || x == -1f;
		bool isJumping = y != 0f;
		bool isFalling = playerRigidbody.velocity.y < -0.1f;
		playerControls.SetBool ("IsWalking", isWalking);
		playerControls.SetBool ("IsRunning", isRunning);
		playerControls.SetBool ("IsJumping", isJumping);
		playerControls.SetBool ("IsFalling", isFalling);
	}
	bool IsGrounded()
	{
		RaycastHit2D myHit;
		int Layermask = 1 << 8;
		Layermask = ~Layermask;
		Debug.DrawRay(transform.position, -(Vector2)Vector3.up, Color.red, 0.1f );
		bool p = Physics2D.Raycast ((Vector2)transform.position, -Vector2.up, /*distToGround*/ 0.1f, Layermask);
		if (p == true) {
			Debug.Log ("T");
		} else {
			Debug.Log("F");
		}
		return p;
	}
}

Your testing if the RaycastHit2D is not null and it never is.
Try this:

RaycastHit2D hit = Physics2D.Raycast(transform.position, -Vector2.up, 0.1f, Layermask);
if(hit.collider != null)
{
   print("HIT");
}

About bitswift, yeh your checking against all layers except for layer 8.
And if layer 8 is ur character this makes sense so you dont check against yourself.