How to check sprite next to player

Is it possible to check if theres a sprite to the left/ right of the player?