NullReferenceExepction Error [duplicate]

I'm getting error an error on this piece of code:

if (EventSystem.current.IsPointerOverGameObject())
return;


The error: NullReferenceExpection: object reference not set to an instance of an object playercontroller.update() { at assets/script/palyer/playercontroller.cs:21)

Any solution to this?

The error message is there to tell you what the problem is. A NullReferenceException means you tried to access a variable that is currently null:
Object a = null;

So in your case, assuming EventSystem is a class, EventSystem.current is null.