How to know wether a layer exists locally on docker 1.10+

I want to detect wether a layer exists in local docker engine? Is there any solutions to do that? I don’t want to look up the docker engine root directory directly. I can provide layer DiffID, BlobSum or ChainID