No, this function does not exist. Since not all objects are indexed, there is no shortcut - the only way to check if a key exists is to try to get it, and then you have entity data available to you for free (in terms of disk operations - there is a bit of serialization, but we do not charge for this).
PS. Are you sure you are not trying to optimize prematurely?
source
share