Better way to check `is value cached`